Skip to content

chore(deps): update dependency @astrojs/vercel to v10 [security]#10339

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-astrojs-vercel-vulnerability
Open

chore(deps): update dependency @astrojs/vercel to v10 [security]#10339
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-astrojs-vercel-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 26, 2026

This PR contains the following updates:

Package Change Age Confidence
@astrojs/vercel (source) ^8.1.3^10.0.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2026-33768

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 duplex bug in the Request constructor (the duplex: '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 passes body: request.body and intends to preserve it. Once the missing duplex option 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

  1. Astro + @astrojs/vercel adapter
  2. output: 'server' (SSR)
  3. No src/middleware.ts defined, 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.


Release Notes

withastro/astro (@​astrojs/vercel)

v10.0.2

Compare Source

Patch Changes
  • #​15959 335a204 Thanks @​matthewp! - Fix Vercel serverless path override handling so override values are only applied when the trusted middleware secret is present.

v10.0.1

Compare Source

Patch Changes

v10.0.0

Compare Source

Major Changes
Minor Changes
  • #​15258 d339a18 Thanks @​ematipico! - Stabilizes the adapter feature experimentalStatiHeaders. If you were using this feature in any of the supported adapters, you'll need to change the name of the flag:

    export default defineConfig({
      adapter: netlify({
    -    experimentalStaticHeaders: true
    +    staticHeaders: true
      })
    })
  • #​15413 736216b Thanks @​florian-lefebvre! - Updates the implementation to use the new Adapter API

  • #​15495 5b99e90 Thanks @​leekeh! - Adds new middlewareMode adapter feature and deprecates edgeMiddleware option

    The edgeMiddleware option is now deprecated and will be removed in a future release, so users should transition to using the new middlewareMode feature as soon as possible.

    export default defineConfig({
      adapter: vercel({
    -    edgeMiddleware: true
    +    middlewareMode: 'edge'
      })
    })
  • #​14946 95c40f7 Thanks @​ematipico! - Removes the experimental.csp flag and replaces it with a new configuration option security.csp - (v6 upgrade guidance)

Patch Changes
  • #​15781 2de969d Thanks @​ematipico! - Adds a new clientAddress option to the createContext() function

    Providing this value gives adapter and middleware authors explicit control over the client IP address. When not provided, accessing clientAddress throws an error consistent with other contexts where it is not set by the adapter.

    Additionally, both of the official Netlify and Vercel adapters have been updated to provide this information in their edge middleware.

    import { createContext } from 'astro/middleware';
    
    createContext({
      clientAddress: context.headers.get('x-real-ip'),
    });
  • #​15778 4ebc1e3 Thanks @​ematipico! - Fixes an issue where the computed clientAddress was incorrect in cases of a Request header with multiple values. The clientAddress is now also validated to contain only characters valid in IP addresses, rejecting injection payloads.

  • #​15460 ee7e53f Thanks @​florian-lefebvre! - Updates to use the new Adapter API

  • #​15450 50c9129 Thanks @​florian-lefebvre! - Fixes a case where build.serverEntry would not be respected when using the new Adapter API

  • #​15461 9f21b24 Thanks @​florian-lefebvre! - Updates to new Adapter API introduced in v6

  • #​15125 6feb0d7 Thanks @​florian-lefebvre! - Updates Node versions data to account for v24 as the default

  • Updated dependencies [4ebc1e3, 4e7f3e8, a164c77, cf6ea6b, a18d727, 240c317, 745e632]:

v9.0.5

Compare Source

Patch Changes

v9.0.4

Compare Source

Patch Changes

v9.0.3

Compare Source

Patch Changes

v9.0.2

Compare Source

Patch Changes

v9.0.1

Patch Changes

v9.0.0

Major Changes
Minor Changes
  • #​14543 9b3241d Thanks @​matthewp! - Enables skew protection for Astro sites deployed on Vercel. Skew protection ensures that your site's client and server versions stay synchronized during deployments, preventing issues where users might load assets from a newer deployment while the server is still running the older version.

    Skew protection is automatically enabled on Vercel deployments when the VERCEL_SKEW_PROTECTION_ENABLED environment variable is set to 1. The deployment ID is automatically included in both asset requests and API calls, allowing Vercel to serve the correct version to every user.


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 26, 2026
@github-actions github-actions bot added the automated PR author detected as automated label Mar 26, 2026
@nx-cloud
Copy link

nx-cloud bot commented Mar 26, 2026

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit d9c1a9d

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ❌ Failed 9m 16s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-26 22:26:18 UTC

@github-actions
Copy link
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

A dependency version for @astrojs/vercel was updated from ^8.1.3 to ^10.0.0 in the Solid Astro example project's package configuration. No other dependencies or project code were modified.

Changes

Cohort / File(s) Summary
Dependency Update
examples/solid/astro/package.json
Updated @astrojs/vercel version constraint from ^8.1.3 to ^10.0.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A version so grand, from eight to ten's height,
Astro's Vercel adapter shines ever more bright!
Dependencies dance in the package.json,
One small bump up makes the example quite strong-on!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is missing required sections from the template (Changes section with motivation, Checklist completion status, and Release Impact determination). While it contains detailed vulnerability information, it lacks the expected structured format. Add a 'Changes' section explaining the update motivation, complete the Checklist items, and specify the Release Impact (whether a changeset is needed for published code or if this is dev-only).
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly indicates a security-related dependency update for @astrojs/vercel to v10, matching the main change in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch renovate/npm-astrojs-vercel-vulnerability

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/solid/astro/package.json`:
- Line 17: Update the package.json dependency entry for "@astrojs/vercel" to
enforce the patched release floor: change the version range string from
"^10.0.0" to "^10.0.2" so fresh installs or lockfile regenerations cannot
resolve vulnerable 10.0.0/10.0.1 releases; locate the line containing the
"@astrojs/vercel" dependency in package.json and modify the version string
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c88382b-b0f6-4f93-aa8b-889ae4d260e3

📥 Commits

Reviewing files that changed from the base of the PR and between 1047cdc and d9c1a9d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • examples/solid/astro/package.json

"@astrojs/solid-js": "^5.0.7",
"@astrojs/tailwind": "^6.0.2",
"@astrojs/vercel": "^8.1.3",
"@astrojs/vercel": "^10.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking dependency declaration floor in package.json..."
rg -n '"@astrojs/vercel"\s*:\s*"\^10\.[0-9]+\.[0-9]+"' examples/solid/astro/package.json

echo
echo "Searching lockfiles for resolved `@astrojs/vercel` versions..."
fd '^(pnpm-lock\.yaml|package-lock\.json|yarn\.lock|bun\.lockb)$' -H .

echo
echo "Resolved versions (if lockfiles exist):"
rg -n '@astrojs/vercel(@|":|\s)' pnpm-lock.yaml package-lock.json yarn.lock 2>/dev/null || true

echo
echo "Expected result: all resolved versions are >= 10.0.2"

Repository: TanStack/query

Length of output: 1119


Update the version constraint to ^10.0.2 to enforce the patched release floor.

The current ^10.0.0 range permits vulnerable versions 10.0.0 and 10.0.1 to be resolved in fresh installs or lockfile regeneration scenarios. Since this PR addresses CVE-2026-33768 (fixed in v10.0.2), the dependency floor must be explicitly set to the patched version.

Suggested change
-    "@astrojs/vercel": "^10.0.0",
+    "@astrojs/vercel": "^10.0.2",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@astrojs/vercel": "^10.0.0",
"@astrojs/vercel": "^10.0.2",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/solid/astro/package.json` at line 17, Update the package.json
dependency entry for "@astrojs/vercel" to enforce the patched release floor:
change the version range string from "^10.0.0" to "^10.0.2" so fresh installs or
lockfile regenerations cannot resolve vulnerable 10.0.0/10.0.1 releases; locate
the line containing the "@astrojs/vercel" dependency in package.json and modify
the version string accordingly.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 26, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10339

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10339

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10339

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10339

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10339

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10339

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10339

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10339

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10339

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10339

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10339

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10339

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10339

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10339

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10339

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10339

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10339

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10339

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10339

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10339

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10339

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10339

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10339

commit: d9c1a9d

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 9.01 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated PR author detected as automated dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants