Skip to content

Fix all open dependency security advisories - #509

Merged
ericzakariasson merged 2 commits into
mainfrom
fix-next-advisories
Nov 5, 2026
Merged

ericzakariasson merged 2 commits into
mainfrom
fix-next-advisories

Conversation

@ericzakariasson

@ericzakariasson ericzakariasson commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Fixes every advisory reported by Dependabot and bun audit. After this PR, bun audit reports no vulnerabilities.

Next.js 16.2.6 -> 16.4.3

Covers all 20 open Dependabot alerts, including the critical RCEs in next/og ImageResponse (GHSA-vcvr-r3jv-pc5j) and the Image Optimization API for SVG/AVIF (GHSA-2464-fhr4-w9xw, GHSA-2xp9-vwfh-vxw4), plus several high-severity SSRF and DoS issues. Also brings sharp 0.35.5, which clears its libvips advisories. 16.4.4 is newer, but its @next/* packages are still inside bunfig's minimumReleaseAge window.

Transitive advisories (only visible to bun audit)

bun audit reported 54 more advisories (1 critical, 27 high) in packages Dependabot doesn't surface from bun.lock:

  • @cursor/sdk 1.0.12 -> 1.2.0 drops sqlite3 and its node-gyp/prebuild tree, which removes the undici, tar@6, @fastify/busboy, ip-address, brace-expansion and @tootallnate/once advisories.
  • next-safe-action 8.5.2 -> 8.7.3 drops deepmerge-ts.
  • tar, nanoid, postcss, zod bumped to patched versions. The root zod override/resolution moves to 4.6.7 so nested copies stay on one version (the reason it was pinned in the first place).
  • Stale nested lockfile entries for postcss, nanoid, source-map-js and baseline-browser-mapping now resolve to the patched hoisted versions.

Code change: plugin scan state root

SDK 1.2.0 removed the platform option the scan used to keep the SDK's run store on writable tmpfs (#395). The scan now opens a SqliteLocalAgentStore (built on node:sqlite, no native module) at the same tmp stateRoot, passes it as local.store, and disposes it when the scan finishes.

Testing

  • bunx biome ci . and bun run typecheck pass.
  • bun install --frozen-lockfile succeeds and bun audit is clean.
  • next build compiles and typechecks. Locally it then stops at the known empty-database generateStaticParams check, so the Vercel preview is the full build check.
  • Smoke test: SqliteLocalAgentStore opens index.db under a tmp state root and disposes cleanly on Node 24.
  • End-to-end scan under next dev (Node): queued a test plugin pointing at octocat/Hello-World, triggered /api/queue/plugin-scans/drain, and the scan downloaded the repo, ran composer-2 through Agent.prompt with the new store, and wrote a safe verdict. The SDK state landed in <tmp>/cursor-sdk-home/sdk-agent-store/index.db, and the store closed cleanly.

ericzakariasson and others added 2 commits November 2, 2026 09:45
next 16.2.6 is affected by five critical advisories, including remote code
execution in next/og ImageResponse (GHSA-vcvr-r3jv-pc5j) and in the Image
Optimization API for SVG and AVIF files (GHSA-2464-fhr4-w9xw,
GHSA-2xp9-vwfh-vxw4), plus several high-severity SSRF and DoS issues.
16.4.3 resolves all of them and brings sharp 0.35.5, which clears its
libvips advisories.

16.4.4 is newer but its @next/* packages are still inside bunfig's
minimumReleaseAge window.
bun audit still reported 54 advisories (1 critical, 27 high) after the
Next.js upgrade, mostly in transitive packages that Dependabot does not
surface from bun.lock.

- @cursor/sdk 1.0.12 -> 1.2.0 drops sqlite3 and its node-gyp/prebuild
  tree, which removes the undici, tar@6, @fastify/busboy, ip-address,
  brace-expansion and @tootallnate/once advisories. 1.2.0 removed the
  `platform` option, so the scan now passes the tmpfs state root through
  an explicit SqliteLocalAgentStore (built on node:sqlite) as
  `local.store` and disposes it after each scan.
- next-safe-action 8.5.2 -> 8.7.3 drops deepmerge-ts.
- tar, nanoid, postcss and zod bumped to patched versions; the root zod
  override/resolution moves with them so nested copies stay aligned.
- Stale nested lockfile entries for postcss, nanoid, source-map-js and
  baseline-browser-mapping re-resolved to the patched hoisted versions.

bun audit now reports no vulnerabilities.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericzakariasson ericzakariasson changed the title Upgrade Next.js to 16.4.3 for critical security advisories Fix all open dependency security advisories Nov 5, 2026
@ericzakariasson
ericzakariasson merged commit b21fd5a into main Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant