Repository navigation
Bundled @vercel/og is patched but still labeled 1.0.1, so scanners flag GHSA-wx4j-mvgx-mqwp on fixed Next releases #101481
Replies: 2 comments
|
I think there's another thing worth considering here. Along with updating A few things that could help:
I agree that moving to an upstream release with Satori >= 0.35.2 would be the cleaner long-term solution, as long as the runtime compatibility issues are resolved. |
|
Confirmed the mismatch is real, and the code is already fixed — only the version label is stale. The SVG-injection fix from #99061 is vendored into Next.js via The fix on the Next.js side is to re-vendor against 1.0.3 (or at least bump the vendored version label so it matches the code). Until that lands, the finding on a patched release is a false positive — worth annotating in your scanner with a reference to #99061 / GHSA-vcvr-r3jv-pc5j rather than chasing an upgrade, since there is no newer |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Goals
@vercel/ogversion bundled in next match the code it actually contains, so SCA/container scanners stop reporting a Critical finding on patched Next releases.next/og.Non-Goals
next/ogbehavior or APIBackground
#99061 fixed the SVG injection by patching
@vercel/og@1.0.1(patches/@vercel__og@1.0.1.patch). The vendored file next/dist/compiled/@vercel/og/index.node.js has the fix from 16.3.6 on, but next/dist/compiled/@vercel/og/package.json still says "version": "1.0.1" (0.11.1 in 16.3.x). The published@vercel/og1.0.1 and 1.0.2 are vulnerable, and 1.0.3 (satori 0.33.5) is fixed.Verification: the published 1.0.1 dist/index.node.js plus the #99061 patch produces the same file as in
next@16.4.5(SHA-256 ea30837b18ace5bd…), with no unescaped SVG interpolation left.Impact: scanners that match on the bundled package's name and version (for example Sonatype IQ, sonatype-2026-008462) report a Critical finding on every Next 16.4.x install, with the remediation "upgrade to 1.0.3". Users can't act on that. The copy is vendored inside next, so overrides/resolutions don't reach it, and users end up filing waivers for code that is already fixed. The bundled satori is also 0.29.0, which is the cause of the kerning issue in #101100.
Proposal
Re-vendor from an
@vercel/ogrelease that is outside the vulnerable range (≥ 1.0.3) and works when loaded from next/dist/compiled, instead of patching 1.0.1.The published 1.0.2 and 1.0.3 don't qualify as-is. Their satori (0.33.x) starts HarfBuzz at import time and looks for hb.wasm, which the package doesn't ship, so importing dist/index.node.js in Node fails with Dynamic require of "fs" is not supported (vercel/satori#801). Satori fixed the loader in 0.35.2 (vercel/satori#791), but no @vercel/og release ships it yet.
So either:
Either way the bundled label moves past the vulnerable range, which is what scanners check.
All reactions