You run npm audit, see a clean zero, and ship your release with peace of mind. Increasingly, though, the biggest holes in JS projects hide where standard checks never look. Here are three late-November security stories: a framework audit blind spot, a WebRTC payment skimmer, and a critical patch for flatted.
The npm audit Blind Spot: How Frameworks Hide Vendored Dependencies
A fresh create-next-app project reports found 0 vulnerabilities. Everything looks spotless. In a November 24, 2026 breakdown by Zach Leatherman, that illusion crumbled fast when the Eleventy creator compared clean installs of create-gatsby and next@16.4.6.
The culprit is vendoring—when a framework bundles third-party libraries directly inside node_modules/next/dist/compiled, bypassing package-lock.json. Standard npm audit never inspects that folder, which held 139 third-party packages and 35 hidden vulnerabilities.
Vulnerabilities in Gatsby vs. vendored packages in Next.js 16.4.6
On critical flaws, a brand-new Next.js app even beat abandoned Gatsby. Vendoring gives frameworks fast installs with zero version conflicts, yet blinds security tooling: some packages only run at build time, but without a report you can't assess the risk. Vite bundles dependencies similarly (node_modules/vite/dist), though it kept its bundle clean.
CLI scaffolders worsen the blind spot: create-gatsby passes --no-audit, create-astro, TanStack CLI, and create-preact silence output, create-nuxt and ng new only show it on errors, sv create clears the log, and pnpm and yarn skip the summary. Prototype Pollution Report helps track the wider picture.
# At the Next.js root, this reports "found 0 vulnerabilities"
npm audit
# Count hidden package.json files inside the vendored directory
find node_modules/next/dist/compiled -maxdepth 2 -name "package.json" | wc -l
# In CI, pair lockfile checks with a broader artifact scanner
osv-scanner scan --lockfile=package-lock.json
That find command reveals the scale of embedded packages, and in CI you should pair lockfile checks with an SBOM and a scanner like OSV-Scanner, Trivy, Snyk, or Socket.dev.
A WebRTC Credit Card Skimmer on Checkout Pages
Checkout monitoring usually watches fetch and XHR so rogue scripts can't exfiltrate card numbers. On November 27, 2026, an InfoHawk investigation uncovered a campaign that bypassed those guards across five retailers: Lascana, Samsonite, American Tourister, Revolve, and FWRD.
The skimmer slipped in through everyday third-party scripts: attackers replaced a Quorum pixel in S3 on Lascana, injected an <img> with onerror into the Seers cookie banner config on Samsonite and American Tourister, and modified a file on Revolve and FWRD's own CDN. After disclosure on November 24, all five sites cleaned up before Black Friday, though a test card was leaked on Lascana.
The loader pulled Insds.js or gtage.js from S3 and activated only on mobile touchscreens (and on Samsonite, strictly on /checkout). From a laptop, everything looked clean. On a phone, the script sent GET /_cf/ice and POST /_cf/rel to *.northbridgeads.com, then opened a WebRTC data channel via turn.cloudflare.com. Because WebRTC was built for video calls, TURN traffic bypasses HTTP monitors and many CSP rules—delivering the skimmer in chunks (verified via SHA-256 and run with eval) and sending stolen cards back out.
The attack's chokepoint is those two initial HTTP calls setting up the channel. A strict connect-src in Content-Security-Policy stops it cold:
Content-Security-Policy:
default-src 'self';
script-src 'self' https://js.stripe.com;
connect-src 'self' https://api.stripe.com https://checkout.example.com;
object-src 'none';
base-uri 'self';
Strip marketing pixels from checkout pages, isolate card inputs inside your payment provider's iframe, and test traffic from real mobile devices. In code and banner configs, watch for KghRtc, rtc-signal-v1, quickfetch, Insds.js, and gtage.js.
flatted 3.5: Hardening the Circular JSON Parser Against Malicious Input
Standard JSON.stringify crashes if an object references itself. To handle circular graphs, projects often rely on the 0.5 KB flatted library—frequently pulled in transitively by tools like ESLint.
On November 30, 2026, flatted 3.5.0 patched four vulnerabilities (GHSA-2pmx-fqfh-7m9p, GHSA-362p-2g6x-jgj9, GHSA-rpvg-j7px-h4mj, GHSA-437v-hc68-7fcr). It removes recursion over raw literal nesting in parse(), stopping malformed null values and invalid indexes from crashing the JS parser with a stack overflow. The Go port now returns an error instead of panicking, revivers handle cycles safely, parse(text, reviver) matches JSON.parse again, array-form replacer is fixed, and a Rust port (webreflection-flatted 0.3.5) joined the lineup. Version 3.5.1 cleaned up devDependencies, so jump straight to it.
# Check where flatted comes from and upgrade to 3.5.x
npm ls flatted
npm install flatted@^3.5.1
If it's a transitive dependency, pin 3.5.1 using overrides in package.json, and always wrap untrusted input in try / catch:
import { parse } from 'flatted';
const safeParse = (raw) => {
try {
return parse(raw);
} catch (err) {
// In 3.5.0+, deep nesting and bad indexes won't blow the stack
console.error('Rejected malformed flatted payload:', err.message);
return null;
}
};
After updating, this wrapper rejects malformed or hostile payloads without risking a Node.js process crash, while reviver behaves just like native JSON.parse again.



