| Nom du plugin | nuxt |
|---|---|
| Type de vulnérabilité | Script intersite (XSS) |
| Numéro CVE | CVE-2026-46342 |
| Urgence | Faible |
| Date de publication CVE | 2026-05-20 |
| URL source | CVE-2026-46342 |
__nuxt_island cache poisoning and XSS — why WordPress sites using Nuxt frontends must act now
Par : Expert en sécurité de Hong Kong
Résumé : Nuxt fixed a vulnerability where the __nuxt_island endpoint did not bind responses to request props, allowing shared-cache poisoning that can lead to stored or reflected cross-site scripting (XSS) for sites using Nuxt SSR or islands with shared caches. WordPress backends paired with Nuxt frontends (headless, hybrid, JAMstack) or sites behind shared CDNs/proxies are at risk. This article explains the issue, realistic exploitation scenarios, and practical mitigations for WordPress teams from a Hong Kong security practitioner’s perspective.
CVE : CVE-2026-46342 — Avis : GHSA-g8wj-3cr3-6w7v — Affected nuxt versions: >= 4.0.0-alpha.1, <= 4.4.5 — Corrigé dans : 4.4.6
Why WordPress site owners should care (even if WordPress itself is not Nuxt)
In Hong Kong and globally, WordPress is used in diverse delivery architectures:
- Traditional: WordPress renders HTML server-side and serves it directly.
- Headless / Hybrid: WordPress is the content backend (REST API / GraphQL) and a JS framework (like Nuxt) renders the frontend with SSR, incremental regeneration, or “islands”.
- CDN and cache-heavy setups: Sites sit behind CDNs and reverse proxies that cache responses for performance.
If your WordPress site uses a Nuxt frontend, or if Nuxt-managed routes are served from the same hostname and caching layer as WordPress content, a Nuxt cache-poisoning issue can inject malicious HTML/JS that browsers execute when pages load. Consequences include XSS, credential theft, ad injection, or further compromise. Even pure-WordPress sites should be aware: mixed stacks sharing a CDN or proxy can suffer cross-impact from a vulnerable Nuxt route.
What exactly went wrong: technical explanation (plain and detailed)
Nuxt’s island architecture exposes an endpoint: __nuxt_island. This endpoint accepts requests carrying “props” used to render islands (small SSR fragments). The bug combines two failures:
- Nuxt returned rendered HTML for
__nuxt_islanddemandes. - The response cache key used by intermediate caches (CDNs, reverse proxies, edge caches) did not reliably include the request props, so different requests could map to the same cache entry.
As a result, a response produced for one set of props could be stored in a shared cache and later served to other visitors who requested the same path but with different props. If props contain attacker-controlled values that are rendered without proper encoding, an attacker can craft a request whose response is cached and then served to many visitors — classic cache poisoning enabling widespread XSS.
Points techniques clés :
- A cache key must distinguish user-specific or request-specific responses. If it doesn’t, users receive content intended for others.
- For SSR endpoints that render dynamic fragments, the cache key must include the props or the endpoint must opt out of shared caching (Cache-Control: private / no-store).
- XSS happens when untrusted input reaches HTML/JS without correct escaping; shared caches multiply the effect.
Realistic attack scenario against a WordPress + Nuxt frontend
Common deployment:
- WordPress serves content via REST API.
- Nuxt frontend performs SSR, requesting data and rendering islands via
__nuxt_island. - Site is served from a common domain using a CDN that caches responses from the Nuxt server.
Exploit steps an attacker could take:
- Find a
__nuxt_islandendpoint that accepts attacker-controlled input via query parameters or request body used as props. - Craft props containing an XSS payload that will be rendered into the fragment without escaping.
- Send the request through the CDN and cause the CDN to cache the response under a shared key.
- Subsequent visitors receive the poisoned HTML and the attacker’s script executes in their browsers.
Conséquences potentielles :
- Credential theft if cookies are present.
- Session theft for admins or editors visiting the front-end.
- SEO and brand damage from inserted ads or redirects.
- Distribution of malware via injected scripts or redirects.
Immediate steps (what to do today — prioritized)
If your site could be affected (you use Nuxt frontends, or a CDN/proxy that serves Nuxt routes), follow this sequence immediately:
- Upgrade Nuxt to the patched release (4.4.6 or later). This is the definitive fix; coordinate with frontend teams and schedule the upgrade now.
- Disable shared caching pour
__nuxt_islandendpoints at CDN/edge/proxy: configure path-based rules to bypass cache or setCache-Controlàno-store/privéuntil you upgrade. - Set origin response headers for island routes: use
Cache-Control: private, no-store, max-age=0ous-maxage=0, and add appropriateVaryheaders for headers/cookies you vary on. - Deploy WAF rules (or CDN edge filtering) to block or monitor suspicious props: flag or block requests containing script tags or encoded script patterns in query/body.
- Purge caches and audit logs: remove any cached island responses, and search logs for suspicious
__nuxt_islandrequests containing payloads liketags or external script references to unfamiliar hosts.Always run rules in monitoring mode first, tune them against real traffic, and escalate to blocking only after validating low false-positive rates.
Cache configuration recommendations
- For server-rendered fragments that depend on per-request data (cookies, auth, props), use
Cache-Control: privateorCache-Control: no-store. Shared caches should not store user-specific content. - If you allow caching, ensure the cache key includes any user- or request-specific identifier used by Nuxt props. Many CDNs allow custom cache key composition — include only the minimal, necessary identifiers to avoid cache collisions.
- Use
Vary:headers correctly. If responses depend onCookieorAuthorization, includeVary: Cookiewhere applicable. - Avoid caching raw HTML fragments that contain unescaped user content.
- Regularly sample cached content to check for integrity and absence of injected scripts.
Detecting if you’ve been hit (indicators of compromise)
- Unexpected inline scripts or external JS from unfamiliar hosts.
- User reports of redirects, popups, or strange behavior on Nuxt-served pages.
- CDN edge logs showing
__nuxt_islandrequests with unusual query strings or bodies followed by many cached GET responses. - Traffic spikes to island paths with new inline scripts.
- Security scanners/site-monitoring alerts flagging injected scripts.
Investigation steps:
- For server-rendered fragments that depend on per-request data (cookies, auth, props), use