JavaScript via CDN without Subresource Integrity

No Comments

Quick Reference

Element Code: SE-003

Issue: CDN-hosted scripts lack integrity attributes

Impact: Vulnerable to CDN compromise or injection attacks

Fix: Add integrity attribute with hash to CDN script tags

Detection: Security audits, CSP reports

What Is This Issue?

When loading JavaScript from CDNs without Subresource Integrity (SRI), you trust the CDN completely. If the CDN is compromised, malicious code could be injected into your site.

Why This Matters for Your Website

CDN compromises have happened. SRI ensures scripts have not been tampered with by verifying their hash.

How to Fix This Issue

  1. Generate hash: Use SHA-384 or SHA-512
  2. Add integrity attribute: Include hash in script tag
  3. Add crossorigin: Required for SRI to work

Tools for Detection

  • SRI Hash Generator: Generate integrity hashes

TL;DR (The Simple Version)

Your CDN scripts lack integrity checks. Add integrity attributes with hashes so browsers can verify scripts have not been tampered with.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog