Next.js: Unauthenticated Remote Code Execution in Image Optimization API when SVG files are used
Description
A memory-related vulnerability in an upstream library used by Next.js for Image Optimization can lead to unauthenticated remote code execution (RCE) when processing SVG files on glibc-based Linux systems. This affects Next.js versions from 10.0.0 up to but excluding 15.5.28, and from 16.0.0 up to but excluding 16.4.1. The vulnerability is critical and can be mitigated by upgrading the 'sharp' library to version 0.35.5 or later, which is included in patched Next.js releases.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Next.js uses an upstream library called 'sharp' for image optimization. A memory-related vulnerability in this library can be exploited to achieve remote code execution without authentication when SVG files are processed on glibc-based Linux environments. The issue affects Next.js versions >=10.0.0 <15.5.28 and >=16.0.0 <16.4.1. Upgrading 'sharp' to version 0.35.5 or higher mitigates the vulnerability. Fresh installs of Next.js automatically include the fixed 'sharp' version. The vulnerability has a CVSS 4.0 vector indicating critical severity with network attack vector, low attack complexity, no privileges required, and no user interaction needed.
Potential Impact
Successful exploitation allows unauthenticated remote code execution on servers running vulnerable Next.js versions on glibc-based Linux. This can lead to full system compromise. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade the 'sharp' library used by Next.js to version 0.35.5 or later. Upgrading Next.js to patched versions (>=15.5.28 and >=16.4.1) ensures that package managers automatically provide the fixed 'sharp' version. Fresh installs of Next.js also include the fixed version. No other workarounds are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-2464-fhr4-w9xw
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["npm"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 4.0
Threat ID: 6ada44ae4d27ba8daa6a2f8c
Added to database: 10/22/2026, 17:15:26 UTC
Last enriched: 10/22/2026, 17:17:24 UTC
Last updated: 10/22/2026, 17:17:24 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.