Repository navigation
fix(deps): update Next.js to 16.4.1, stop untrusted Office uploads reaching file-type's ASF loop, and patch transitive advisories - #9306
Conversation
…aching file-type's ASF loop, and patch transitive advisories
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed
Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issue was found. SummaryUpdates Next.js to 16.4.1, patches several transitive dependencies, and rejects non-ZIP input before it reaches
Reviews (2) · Last reviewed commit: "test(file-parsers): prove the ZIP guard ..." · Reviewed by Greptile |
…payload in the test worker
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 12 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.
Turn on auto-fix | Re-trigger cubic
Summary
@next/envand the swc binaries). 16.4.1 fixes two critical advisories and one high (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr, GHSA-p3m5-59mp-jv5r). Sim was not exposed to any of them: sharp is already 0.35.5 (the image-optimizer workaround), and the app has no'use cache'functions or Server Actions. 16.4.2 adds only Turbopack and docs fixes and is still inside the 7-day release-age gatepatches/next@16.4.0.patch(Vary merging, seepatches/README.md) is nownext@16.4.1.patch. bun keys patches by exact version and silently dropped it on the bump, whichdocs HTTP's header E2E caught. The patchedpatch-set-header.jsfiles are byte-identical in 16.4.0 and 16.4.1, and the patch applies cleanlyparseOfficeTextnow refuses anything that isn't a ZIP package. officeparser 5 sniffs every buffer withfile-type16, whose ASF detector loops forever on a zero-size sub-header (GHSA-5v7r-6r5c-r473; no 16.x fix, and officeparser 8 is a rewrite). A 55-byte upload named.docxor.odtreached that path once mammoth or the ODF walker rejected it, and stalled the event loop. Every format routed to officeparser is a ZIP package, so nothing legitimate is turned away@ai-sdk/provider-utils3.0.28: response bodies get a size limit (Stagehand's AI SDK providers)image-size2.0.4: pptxgenjs declares it but only references it in commented-out codesource-map-js1.2.2,fast-copy4.2.0 andbaseline-browser-mapping2.11.28: build and dev toolingelectronjoinsnextinminimumReleaseAgeExcludes. Its exact security pin (43.8.1, from fix(tls): distrust the roots behind the compromised eMudhra intermediates #9248) is under 7 days old until Oct 27. Vercel builds with bun 1.3.14, which re-checks that pin against the gate whenever the lockfile changes, so the docs preview failed inbun install. Reproduced with 1.3.14 locally; the exclusion fixes it and leaves the lockfile unchangedRemaining
bun auditfindings, checked and not reachablebraces(no fix): Sim only callsmicromatch.isMatch/matcher, which go through picomatch;bracesis reached only by build tooling (fast-glob, chokidar)http-cache-semantics(no fix): only throughgotin electron's download step and artillery; no shared cachefile-type: covered by the guard abovejs-yaml3.x: gray-matter on our own content, and artillery. Sim's own YAML parsing is on 4.3.2fflate0.4/0.7: posthog-js and opentype.js never callunzipuuid9: gaxios and teeny-request only callv4(), with nobufargument@opentelemetry/core2.7.1: inside Trigger.dev workers, which take no inbound HTTP baggagesprintf-js: tedious and roarr only use constant format stringscsv-parse,moment,esbuild0.18,vite8.0,postcss-selector-parser,katex: dev, load-test or build tooling, or need prototype pollution that already exists@better-auth/oauth-providerGHSA-p2fr: not exploitable here; fixed only in 1.7.xType of Change
Testing
apps/docstest:headers:e2e: 16/16 checks pass with the patch carried to 16.4.1 (failed in CI without it)officeparser-module.test.ts: the 55-byte ASF payload is refused withinvalid_formatbefore officeparser receives it. With the guard reverted, the test fails in milliseconds. Locally, against the real docx and odt parsers, the payload hung the process until a 60s watchdog killed it; with the guard, both settlebun auditbefore and after: the Next.js, ai-sdk, image-size, source-map-js, fast-copy and baseline-browser-mapping findings are goneChecklist
test-auditauthoring gate)