Article

We Scanned Nearly 200,000 Websites. Almost Half Serve Vulnerable JavaScript.

Why patched Git repositories still ship outdated bundles, leaked API keys, and unguarded third-party tags into visitors' browsers.

By Daniel Bunte • Published: 2026-11-18

In November 2026, the OPTIMJACK incident (uncovered by Scott Helme at Report URI ) showed how quickly clean Git repositories can diverge from production reality. Attackers exploited a flaw inside Optimizely Web Experimentation to inject malicious loaders into 188 customer snippets across 178 major organizations, including GitLab, Salesforce, Zoom, the BBC, CNN, HSBC, and IKEA.

Not a single victim had their own repository or web server breached. Their pull requests, lockfiles, and CI checks were green. Yet for roughly 17 hours, visitors’ browsers trusted an external CDN snippet that swapped crypto wallet addresses, skimmed payment cards, captured screenshots, and delivered mobile exploit chains. Roughly 85% of tested victims lacked a strict Content-Security-Policy that could have blocked those unauthorized scripts.

Were those 178 organizations outliers, or is this blind spot systemic across the open web? To find out, we passively scanned 196,347 domains (122,920 organizations) from the outside in, inspecting 4.06 million live JavaScript files (176 GB) alongside TLS, HTTP headers, cookies, and DNS records.

What We Found Across 196,347 Websites:

  • 46% of active websites serve confirmed vulnerable JavaScript libraries in production, and 66.5% of those flaws live on the site’s own domain where engineering can fix them directly.
  • 50% of live library detections stay invisible to filename and banner scanners without deep JavaScript inspection.
  • 82% of active websites load external scripts without strict Content-Security-Policy containment or Subresource Integrity.

1. Why Half of Live JavaScript Is Invisible to Traditional Scanners

If you ask an engineer how external scanners identify frontend libraries, the usual answer is simple: check filenames like jquery-3.6.0.min.js, read ?ver= parameters, or scan copyright comment banners.

On the modern web, that fails almost half the time. Bundlers like Vite, Webpack, esbuild, and Turbopack merge dozens of packages into opaque files like assets/vendor-9f81c2b.js, rename internal symbols to single letters, and strip comments during minification.

To see past those stripped filenames, Vioro unpacks minified and tree-shaken JavaScript, analyzes code structure and function signatures, and matches them against our database of 5,000+ npm packages and 230,000+ security advisories. You can read more in our vulnerable libraries guide.

Across 1.1 million package detections in our crawl, 50% came exclusively from deep JavaScript inspection, with no library name in the filename, script URL, or header comment. Traditional signals recovered only a fraction in comparison: comment banners caught 38%, static asset heuristics 6%, and CDN URL patterns 4%.

Looking inside the compiled code also surfaced multi-version drift on the same page: 11% of active websites load two or more conflicting versions of the exact same library simultaneously, usually a modern app bundle next to a legacy widget shipping jQuery 1.x or 2.x.


2. Why Modern Frameworks Expose More Code (and 3x More Secrets)

Most teams assume migrating from a classic CMS to a modern JavaScript framework automatically improves frontend security. Our data shows the opposite happens by default.

Frameworks & CMS Impact

Vulnerable Websites by Framework & CMS

Sorted by real-world vulnerable sites (flaw rate x footprint).

Modern JS frameworks CMS & static baselines
React & Next.js ~24,320 vulnerable (73% of 33,449)
WordPress ~16,620 vulnerable (56% of 29,465)
Vue.js ~5,570 vulnerable (75% of 7,390)
Angular ~980 vulnerable (81% of 1,212)
Astro ~370 vulnerable (8% of 4,624)

Baseline without a detected framework or CMS (Custom & Static Web): 34% vulnerable (~29,050 of 86,454 sites).

Across the 175,262 active websites, payload size strongly drives vulnerability exposure. Modern SPA stacks ship a median of 1.8 MB of JavaScript per homepage (2.1 MB for React, 2.9 MB for Angular), over 12x more client code than custom or static sites (148 KB) and 55x more than islands architectures like Astro (32 KB). More transitive browser packages mean more advisories lingering in build artifacts and CDN caches.

Even more surprising is what happens with secrets and source exposure. Overall, 3.2% of websites (5,575 sites) leak high-severity client-side secrets, including AWS access keys, database connection URIs, bearer JWTs, and Slack webhooks, while 24% (41,527 websites) serve raw .js.map source maps over public HTTPS, handing anyone with browser DevTools the original unminified source tree. On modern JavaScript frameworks, the secret leak rate jumps 3.1x from 2% on other stacks to 7%.

Client-Side Secrets

3.1x

Higher Secret Leaks on Modern Stacks

Modern JS frameworks 7%
Other stacks 2%

Even sites with locked-down infrastructure (TLS 1.3, valid HSTS, and enforced DMARC) still serve confirmed JavaScript flaws half the time and leak client-side secrets 2.1x more often when nobody is watching the compiled output in production.

How VITE_ Prefixes and Frontend AI Calls Leak Private Keys

Passive scanning cannot prove whether a human or an AI coding assistant wrote a frontend bundle, so we do not guess “vibe-coding” percentages. Instead, the telemetry shows the exact leak signatures left behind by rapid frontend builds:

The Prefix Problem: VITE_* and REACT_APP_* leaked 108 actionable secrets across 76 websites (VITE_* had 170 exposed variables with 41 High or Critical secrets across 33 sites, while REACT_APP_* had 129 exposed variables with 67 actionable secrets across 43 sites, including 18 findings literally named *_SECRET* or *_PRIVATE* across 16 sites). By contrast, NEXT_PUBLIC_* had 186 publishable-key hits and zero actionable High or Critical leaks, because having PUBLIC in the prefix makes developers pause where neutral prefixes like VITE_ do not.

The same pattern shows up in live AI integrations. We found 74 exposed OpenAI API keys across 48 live websites, with 69% (33 of 48 sites, 56 keys) sitting inside modern JavaScript frameworks where LLM calls were wired directly into the browser instead of a backend proxy.

Rapid-build backend SDKs showed similar exposure: sites shipping firebase (681 sites) had a 14% actionable secret leak rate and 43% exposed .js.map source maps, while @supabase/supabase-js (920 sites) had a 4.6% secret leak rate and 73% confirmed vulnerable JavaScript packages. To remain strictly non-intrusive, this study did not probe /.env directly, though VITE_ build-time leaks and .env exposure remain critical production checks for live web apps.


3. Where Vulnerabilities Actually Hide (and Why External CDN Scripts Stay Unpatched for Years)

Most vulnerable libraries in production are not unfixable third-party SaaS widgets. Across all confirmed vulnerability detections:

  • 66.5% (109,049 detections across 57,769 sites) run on the site’s own first-party domain: bundled npm packages (lodash, jquery, next, dompurify), stale deploy artifacts, or forgotten legacy /js/ scripts. Every one of these is directly fixable by your engineering team.
  • 33.1% (54,240 detections across 25,502 sites) come from external script hosts: led by developer-pinned public library CDNs (ajax.googleapis.com on 4,984 sites, cdn.jsdelivr.net on 2,606, code.jquery.com on 2,282, and cdnjs.cloudflare.com on 2,208) where you control the <script src> URL directly, alongside SaaS and marketing embeds (such as HubSpot forms or Optimizely) where you control removal or browser isolation.

85% of active websites load external scripts, yet almost none lock them down with strict Content-Security-Policy (77% have none at all and 19% allow unsafe-inline or unsafe-eval) or Subresource Integrity (enforced across all external scripts on less than 1% of sites), leaving 82% of all websites running external scripts without browser-level protection.

10x Remediation Gap

Median Age of Known Flaws in Production

Developer-pinned public CDN tags outlive rebuilt first-party bundles by more than six years.

6.5 Years

External Public CDN Libraries

2,387 days median age

8 Months

First-Party App & Legacy Bundles

239 days median age

10x older on external public CDNs

When a developer-pinned external CDN library goes stale, it stays stale for years. Confirmed vulnerabilities in external public CDN <script src> tags have a median age of 6.5 years (2,387 days), nearly 10x older than flaws inside rebuilt first-party app bundles (8 months, or 239 days). A utility script dropped into a layout header six years ago quietly outlives multiple team turnovers while remaining invisible to npm audit.


Practical Defense: Monday-Morning Steps to Close the Gap

Closing this exact gap between what passes in Git and what runs in visitors’ browsers is why we built Vioro. Here are four practical steps any team can take this week:

  1. Inventory your live URLs from the outside: Check the actual first-party bundles, legacy /js/ scripts, and external <script src> tags served to visitors’ browsers, not just package.json. See our vulnerable libraries guide.
  2. Block .js.map files and audit VITE_* / REACT_APP_*: Lock web server rules so source maps never ship publicly in production, and verify your transport and header posture with our TLS guide and HSTS guide.
  3. Upgrade or retire legacy <script src> CDN links: Replace six-year-old pinned library URLs with maintained dependencies or remove unused widgets altogether.
  4. Start Content-Security-Policy in Report-Only mode first: Roll out Content-Security-Policy-Report-Only to discover legitimate third-party hosts safely before enforcing blocking rules. Follow our Content-Security-Policy guide.

See what your website exposes today

Run a free instant check on any public URL to spot exposed versions, missing security headers, and certificate risks.


Methodology & Privacy Commitment

Data Protection Commitment: All figures in this report come from strictly anonymized, aggregated external observations. We never publish target domain lists, hostnames tied to vulnerable versions, or raw credential strings. Small taxonomy cells below 5 distinct domains are automatically suppressed before report generation.

  • Crawler & Ethics: Our passive scanner, VioroBot , operates over standard public HTTPS with strict robots.txt compliance (52 blocked domains respected), rate limiting, and zero active fuzzing or exploit payloads.
  • Clean Denominators: From 196,347 scanned domains (122,920 organizations), we excluded 6,884 WAF/challenge gates and 14,149 non-200 responses, leaving 175,262 clean active websites (111,548 organizations) and 4,062,928 live JavaScript chunks (176.49 GiB) for analysis.
  • No Anycast Distortion: Offline MaxMind IP lookups and public ASN data separate Anycast CDN edges (66,155 active sites) from regional origin servers, with subdomains deduplicated to registrable organizations (eTLD+1) and 95% Clopper-Pearson confidence intervals applied across rates.
View Cohort Breakdown Diagram (196,347 Scanned Domains)
flowchart TD
    T["196,347 Scanned Domains<br/>(122,920 Distinct Organizations)"] --> RB["52 Blocked by robots.txt<br/>(Respected Strictly)"]
    T --> WC["6,884 WAF / Challenge Gates<br/>(Excluded from JS/Header Stats)"]
    T --> NE["14,149 HTTP Non-200<br/>(Redirects / Errors / Offline)"]
    T --> HV["175,262 Clean Active Websites<br/>(HTTP 200 HTML Cohort · 111,548 Orgs)"]
    HV --> JS["4,062,928 Live JS Chunks Analyzed<br/>(176.49 GiB of Client Code)"]
    HV --> SEC["Headers, Redirects, Cookies & Secrets"]
    T --> DNS["196,347 DNS & TLS Records<br/>(Including Origin vs Anycast Split)"]

See What Your Live Website Actually Ships to Browsers

Vioro checks what actually runs on your live public URLs over HTTPS: inspecting compiled JavaScript bundles across 5,000+ packages and 230,000+ advisories, leaked secrets, Content-Security-Policy headers, and TLS health with zero agents or repository tokens.

Daniel Bunte is Founder & CTO at Vioro (Cyze AS), bringing more than 20 years of experience in distributed software architecture, chaos engineering, and application security. He holds a CompTIA PenTest+ certification.

His engineering background spans high-reliability systems in energy infrastructure, e-commerce, and enterprise SaaS across Rust, TypeScript, Kotlin, Java, and PHP, with a focus on security hardening and operational resilience.

Want to discuss web security, monitoring, or system resiliency?
Connect with Daniel on LinkedIn

Catch live production risks with Vioro

Continuously inspect live JavaScript bundles, third-party scripts, leaked secrets, TLS certificates, and uptime across your public URLs.

Start 14-day trial

Free 14-day trial • 100% EU-hosted • Zero agents or repo access