Karen IT Security Response Center (KSRC) Advisory
Advisory ID: KSRC-2026-11252 | Publication Date: 25 November 2026
Critical Unauthenticated RCE in Next.js Image Optimization
CVE-2026-96889 – Via sharp / librsvg (SVG Processing)
Summary
A critical remote code execution vulnerability has been identified in Next.js applications that use the Image Optimization feature. The vulnerability is tracked as CVE-2026-96889.
The root cause is a use-after-free memory corruption issue in the upstream librsvg library, which is used by the popular sharp image processing library. When Next.js processes SVG files through the Image Optimization API on glibc-based Linux systems, an unauthenticated attacker can achieve remote code execution.
CVSS Score: 9.5 (Critical)
Affected Versions
- Next.js 10.0.0 through 15.5.27
- Next.js 16.0.0 through 16.4.0
- Systems using
sharpversions lower than 0.35.5
The issue primarily affects self-hosted Next.js deployments running on glibc-based Linux distributions when SVG files are processed.
Fixed Versions
- Next.js 15.5.28
- Next.js 16.4.1
sharpversion 0.35.5 or later
Recommendations
- Upgrade Next.js to one of the fixed versions:
- For the 15.x line:
npm install [email protected] - For the 16.x line:
npm install [email protected]
- For the 15.x line:
- Verify the sharp version after upgrading:
npm ls sharp
Ensure the installed version is 0.35.5 or higher. - If an older version of sharp remains (especially common on Next.js 15.x projects), force the upgrade:
npm install sharp@^0.35.5
- Rebuild and redeploy the application after the updates.
- As a temporary measure, consider restricting or disabling SVG processing through the Image Optimization API if an immediate upgrade is not possible.
Additional Notes
Public proof-of-concept code exists for the underlying librsvg vulnerability. While widespread active exploitation of the Next.js path has not been widely reported at the time of this advisory, organizations running self-hosted Next.js instances should treat this as a high-priority update.
Support from KSRC
KSRC (Karen IT Security Response Center) is available to assist with version checking, upgrade guidance, and verification of the sharp dependency.
Karen IT
We make the Internet harder to abuse.