Next.js (sharp, librsvg) · CVE-2026-96889 · CVE-2026-114111 · CVE-2026-119347
Next.js image RCE
Patch now if…Only with sharp below 0.35.5 on glibc Linux.
A memory bug in librsvg, the SVG library bundled inside sharp, may let an attacker with no login run code through Next.js image optimization on glibc-based Linux. Almost every Next.js version is affected, and a separate bug fixed on 3 Nov let self-hosted sites parse an attacker's SVG even with SVG support off (the default). The fix is a newer sharp, which upgrading Next.js doesn't always pull in on 15.x; no exploit or attacks are reported.
How scary is it?
Are you affected? only if all are true
1sharp older than 0.35.5command
Next.js 10.0.0 to 15.5.27 or 16.0.0 to 16.4.0 with sharp below 0.35.5, which bundles the unfixed librsvg. Next.js 15.5.28 and 15.5.29 still accept sharp 0.34.x, so an old lockfile can keep the bug after upgrading Next.js; 16.4.1 and later require 0.35.5.1,5,6,7
npm ls sharp2Running on glibc-based Linuxcommand
Vercel says the code execution risk is when Next.js runs on glibc-based Linux. Alpine and other musl-based images aren't named as affected.1
ldd --version3The image optimizer takes an attacker's SVGcommand
With dangerouslyAllowSVG: true it does by design. With the default false, self-hosted sites before 15.5.29 or 16.4.5 can still be made to parse an attacker-supplied SVG at /_next/image (CVE-2026-119347). The advisories don't say whether Vercel-hosted sites or apps with tight image source rules are exposed.1,2
grep -rn dangerouslyAllowSVG next.config.*What to do
1Upgrade Next.js and check sharpcommand
Go to 16.4.5 or 15.5.29, which fix this and the SVG bypass, then check that npm ls sharp shows 0.35.5 or later; on 15.x, update sharp yourself if it doesn't. Rebuild and redeploy.1,2,7
npm ls next sharp2Can't upgrade Next.js? Upgrade sharp
Vercel's workaround: make sure the sharp Next.js uses is 0.35.5 or later. Fresh installs get it automatically.1,6
This page shows you how to check. It can't tell you you're safe.
Sources (10) and changelog
- Next.js GHSA-2464: image optimization RCE, versions, sharp 0.35.5 workaround 14 Oct
- Next.js GHSA-7qx7: SVG reaches the parser even with dangerouslyAllowSVG off 3 Nov
- Next.js: 14 Oct security update 14 Oct
- CVE record: CVE-2026-96889, librsvg use-after-free (Red Hat) 23 Sep
- CVE record: CVE-2026-114111, sharp before 0.35.5 21 Oct
- sharp v0.35.5 release (bundles the fixed librsvg) 27 Sep
- npm registry: next 15.5.29 still accepts sharp 0.34.x
- GNOME librsvg issue 1241: report and crash reproducer 18 Sep
- Cloud Security Alliance: no exploitation reported as of 15 Oct 16 Oct
- CISA KEV catalog: not listed
- Published.