Skip to main content

Next.js CVE-2026-44577

MEDIUM
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-05-11 https://github.com/vercel/next.js GHSA-h64f-5h5j-jqjh
5.9
CVSS 3.1 · Vendor: https://github.com/vercel/next.js
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Discover self-hosted Next.js application
  2. Delivery
    Identify accessible /_next/image endpoint
  3. Exploit
    Enumerate local asset paths matching images.localPatterns
  4. Install
    Request large local asset via image optimization
  5. C2
    Load entire file into process memory
  6. Execute
    Repeat requests with multiple asset variants
  7. Impact
    Exhaust Node.js process memory
  8. Step 8
    Trigger 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm next fix: 15.5.16, 16.2.5

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

Vendor (https://github.com/vercel/next.js) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/vercel/next.js).

CVSS VectorVendor: https://github.com/vercel/next.js

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:npm/next
pkg:npm/next

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy