Next.js CVE-2026-44577
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconDiscover self-hosted Next.js application
-
DeliveryIdentify accessible /_next/image endpoint
-
ExploitEnumerate local asset paths matching images.localPatterns
-
InstallRequest large local asset via image optimization
-
C2Load entire file into process memory
-
ExecuteRepeat requests with multiple asset variants
-
ImpactExhaust Node.js process memory
-
Step 8Trigger out-of-memory condition and application crash
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability requires: (1) Self-hosted Next.js deployment (not Vercel), (2) Default or configured images.localPatterns in use (by default, all patterns are allowed), (3) Image Optimization API enabled (not disabled via images.unoptimized: true), (4) Default image loader in use (not images.loader: 'custom'), and (5) Attacker network access to the /_next/image endpoint without authentication (CVSS PR:N). The exploitation is not automatic or trivial - attackers must either discover or guess valid local asset paths that match localPatterns and obtain files large enough to exhaust memory. AC:H reflects this; attackers need prior reconnaissance or knowledge of application architecture. Conversely, any self-hosted Next.js instance without explicit mitigations and with default settings is potentially vulnerable to DoS if any large local assets are accessible or discoverable. |
| Impact | CVSS 5.9 with network vector (AV:N) and high attack complexity (AC:H) indicates real but not trivial exploitation risk. The AC:H factor suggests attackers must satisfy specific conditions - specifically, the local asset must match images.localPatterns and be large enough to exhaust memory, which requires prior knowledge of hosted assets or discovery. EPSS score and active exploitation status are not provided in the input data, so real-world prevalence is unknown. However, this is NOT a network-default-configuration attack; several mitigating factors exist: Vercel-hosted applications are unaffected, images.unoptimized: true bypasses the vulnerability, custom loaders are safe, and the attack requires the vulnerable image loader to be in use with local patterns enabled. The denial of service impact (availability only, no confidentiality or integrity breach per CVSS vector) is significant for service uptime but not data compromise. Risk is moderate for self-hosted deployments with default configurations handling untrusted content; low for restricted deployments or those using workarounds. Patch availability reduces active risk exposure. |
| Exploit ScenarioDerived | An attacker discovers a self-hosted Next.js application using the default image loader. The attacker crafts requests to /_next/image with local asset paths (e.g., matching default localPatterns) pointing to large files (multi-gigabyte images, videos, or archives), repeatedly requesting optimized variants. Each request loads the full file into the Node.js process memory without size limits, triggering out-of-memory errors that crash the application or degrade performance until the process is terminated. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 11, 2026
Denial of service in Next.js Image Optimization API allows remote attackers to exhaust server memory by requesting large local assets through the /_next/image endpoint when using the default image loader without size limits. The vulnerability affects self-hosted Next.js deployments with default or configured images.localPatterns; Vercel-hosted and applications using unoptimized images or custom loaders are unaffected. Vendor-released patches available: version 15.5.16 and 16.2.5.
RemediationAI
Upgrade Next.js to version 15.5.16 or later if on the 15.x branch, or version 16.2.5 or later if on the 16.x branch. The patch applies consistent response size limits to internal image fetches via the new images.maximumResponseBody configuration option. If immediate upgrade is not feasible, implement workarounds: disable image optimization for untrusted local assets by setting images.localPatterns: [] (remote images remain functional), or block access to /_next/image endpoint at the edge/reverse proxy for untrusted clients. Alternatively, segregate large local assets away from image optimization routes or disable the Image Optimization API entirely if not required. Verify that custom image loaders or images.unoptimized: true are in use for critical paths to confirm non-impact. Security advisory: https://github.com/vercel/next.js/security/advisories/GHSA-h64f-5h5j-jqjh.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Next.js Image Optimization API is a server-side image processing feature that fetches and optimizes images to improve web performance. When self-hosting with the default image loader, the API processes requests to the /_next/image endpoint to fetch local images matching images.localPatterns configuration. The underlying vulnerability stems from CWE-770 (Allocation of Resources Without Limits or Throttling) - the image fetching code loads entire image files into process memory without enforcing maximum response size constraints, unlike the existing protections applied to external image requests. The root cause is inconsistent application of size limits between internal (local) and external image fetch operations. NPM package pkg:npm/next is the affected component.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/vercel/next.js).
CVSS VectorVendor: https://github.com/vercel/next.js
DescriptionCVE.org
Impact
When self-hosting Next.js with the default image loader, the Image Optimization API fetches local images entirely into memory without enforcing a maximum size limit. An attacker could cause out-of-memory conditions by requesting large local assets from the /_next/image endpoint that match the images.localPatterns configuration (by default, all patterns are allowed).
- If you are using
images.localPatterns, only the patterns in that array are impacted. - If you are using
images.unoptimized: true, you are NOT impacted. - If you are using
images.loader: 'custom', you are NOT impacted. - If you are using Vercel, you are NOT impacted.
Fix
We now apply response size limits consistently to internal image fetches, not just external ones, and fail oversized responses before they can exhaust process memory.
This can be adjusted using the images.maximumResponseBody configuration.
Workarounds
If you cannot upgrade immediately, avoid routing large local assets through /_next/image, disable image optimization for large or untrusted local files, or block image optimization access to those assets at the edge.
You can disable using the images.localPatterns: [] configuration. This will still allow fetching remote images (which is not impacted).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
GHSA-h64f-5h5j-jqjh
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB