Skip to main content

image-size EUVDEUVD-2025-210087

| CVE-2025-71319 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-06-09 VulnCheck GHSA-m5qc-5hw7-8vg7
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Recon
    Identify endpoint that processes uploaded images
  2. Delivery
    Craft 8-byte file with JXL/HEIF/JP2 box size zero
  3. Exploit
    Submit file via upload or fetch endpoint
  4. Install
    image-size detector dispatches to vulnerable handler
  5. C2
    findBox enters infinite loop, pinning worker
  6. Execute
    Repeat to exhaust worker pool
  7. Impact
    Service becomes unavailable

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
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

Exploitation requires that the target application pass attacker-controlled bytes to image-size's detector - typically any file upload, URL-fetched image, or media-processing pipeline using the vulnerable 1.1.0-1.2.0 or 2.0.0-2.0.1 versions. No authentication is required by the library itself (CVSS PR:N), no user interaction, and no special image-size configuration; the default code path through detector() reaches findBox on any input whose first byte does not match the firstBytes table and whose bytes 4-8 form 'JXL ', 'ftyp' for HEIF, or the JP2 signature. Limiting factors are deployment-level rather than library-level: callers that already wrap image-size in a timeout, a subprocess, or a sandbox with CPU limits will see degraded availability for that worker rather than full process hang, and services that strictly whitelist content types before invoking image-size may not reach the vulnerable handlers.

Impact

The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N with VA:H and no confidentiality or integrity impact accurately reflects a pure availability bug reachable by any remote caller that can submit an image. EPSS and CISA KEV data were not provided, so there is no confirmed evidence of in-the-wild exploitation, but the GHSA advisory publishes enough detail (including payload construction guidance) that a working POC is trivial to derive, which should be treated as effectively public. Real-world risk is concentrated in services that accept user-supplied images and call image-size synchronously on the request thread - there a single malicious upload pins a worker indefinitely, and repeated uploads exhaust the worker pool. For services that run image-size in isolated subprocesses with timeouts the practical impact is lower, so prioritization should follow how the library is invoked rather than the headline 8.7 score.

Exploit ScenarioDerived

An attacker uploads an 8-byte file whose bytes at offsets 4-8 spell 'JXL ' (or the analogous HEIF/JP2 ftyp marker) and whose remaining bytes are zero to any endpoint that detects image metadata using image-size, such as an avatar upload, a CMS media library, or a chat attachment handler. The request thread enters an infinite loop inside findBox and never returns, and by submitting one such request per worker the attacker exhausts the Node.js process pool and takes the service offline. The advisory publishes the payload structure, so while no standalone POC is linked, weaponization is a few lines of code.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv3 – Jun 09, 2026

Denial of service in the npm image-size library (versions 1.1.0-1.2.0 and 2.0.0-2.0.1) lets remote unauthenticated attackers hang any application that parses untrusted JXL, HEIF, or JP2 images. By supplying a crafted file whose ISO-BMFF-style box declares a size of zero, the findBox routine never advances its offset and enters an infinite loop during validation. No public exploit identified at time of analysis, though the vendor advisory includes payload details that make weaponization straightforward.

Earlier versions of this analysis (2)
v2 Jun 09, 2026 - 21:28 cvss changed CVSS 8.7

Denial of service in the npm image-size library (versions 1.1.0-1.2.0 and 2.0.0-2.0.1) allows remote unauthenticated attackers to hang any application that parses untrusted images. A specially crafted JXL, HEIF, or JP2 file with a zero-sized box triggers an infinite loop inside the findBox routine during validation. No public exploit identified at time of analysis, but the GHSA advisory includes a detailed root-cause walkthrough that effectively serves as exploitation guidance.

v1 Jun 09, 2026 - 20:45 CVSS 7.5

Denial of service in the image-size npm package (versions 1.1.0 to 1.2.0 and 2.0.0 to 2.0.1) allows remote attackers to hang Node.js applications by submitting crafted JXL, HEIF, or JP2 images containing a box with size zero, which triggers an infinite loop inside the findBox parsing routine. The CVSS 7.5 score reflects high availability impact with no authentication required, though no public exploit identified at time of analysis and the issue is not listed in CISA KEV. Any web service, CMS, or pipeline that calls image-size on user-supplied images is at risk of resource exhaustion.

RemediationAI

Upgrade image-size to vendor-released patch version 1.2.1 on the 1.x branch or 2.0.2 on the 2.x branch, both of which contain commit 8994131c7c3ee8da1699e04700c95e0e683a0c68 that fixes the findBox loop; consult https://github.com/image-size/image-size/security/advisories/GHSA-m5qc-5hw7-8vg7 for the authoritative advisory. Run npm audit fix or update package-lock.json and any transitive pins (image-size is commonly pulled in by image-processing middleware), and rebuild containers so the patched version is actually loaded. If immediate upgrade is not possible, compensating controls include invoking image-size inside a worker thread or child process with a hard wall-clock timeout (sub-second is sufficient because legitimate detection is microsecond-scale), rejecting uploads whose first 8 bytes match the JXL/HEIF/JP2 ftyp signatures at the edge until patched, or limiting upload size - note the size limit only narrows the attack surface because a malicious file can be as small as 8 bytes.

Affected VersionsENISA

image-size 2.0.0 <2.0.2
image-size 1.1.0 <1.2.1

Affected Packages

npm image-size fix: 1.2.1, 2.0.2

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

image-size is a widely deployed npm package for detecting image dimensions and type from raw bytes, frequently embedded in web upload pipelines, thumbnailers, and image-processing middleware. The flaw lives in lib/types/utils.ts in the readBox/findBox helpers used by the JXL, HEIF, and JP2 type handlers, which iterate through ISO base media file format boxes by reading a 32-bit big-endian size field and adding it to the current offset. When boxSize is 0 the bounds check (input.length - offset < boxSize) is satisfied and offset is never incremented, producing the CWE-835 'Loop with Unreachable Exit Condition' infinite loop. Because the detector falls through to these handlers whenever the first byte does not match a known signature, an attacker only needs the bytes at offsets 4-8 to spell 'JXL ' (or the equivalent HEIF/JP2 markers) to reach the vulnerable path.

Know when Image Size gets its next vulnerability

  • 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 (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch available
Jun 09, 2026 - 22:03 EUVD
Analysis Updated
Jun 09, 2026 - 21:28 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 09, 2026 - 21:28 vuln.today
v2 - CVSS changed
CVSS changed
Jun 09, 2026 - 21:22 NVD
7.5 (HIGH) 8.7 (HIGH)

DescriptionCVE.org

image-size 1.1.0 before 1.2.1 and 2.0.0 before 2.0.2 contain a denial of service vulnerability in the findBox function when processing specially crafted images with zero-sized boxes. Remote attackers can cause application hang by supplying malicious JXL, HEIF, or JP2 image files with box size zero, triggering infinite loops during image validation.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4 npm packages depend on image-size (3 direct, 1 indirect)

Ecosystem-wide dependent count for version 1.1.0.

Executive ViewAI

Why It Matters

The npm image-size library (versions 1.1.0-1.2.0 and 2.0.0-2.0.1) contains a denial-of-service vulnerability allowing remote attackers to hang applications that parse untrusted JXL, HEIF, or JP2 image files, potentially disrupting any service relying on this library for image validation or metadata extraction. Organizations using vulnerable versions face service downtime whenever user-supplied or externally-sourced images are processed. The absence of a vendor patch requires immediate interim controls to mitigate risk.

Business Impact: High
Compensating Controls

Since no vendor-released patch identified at time of analysis, implement interim mitigations: (1) strict input validation-reject or sandbox image files from untrusted sources before image-size processing; (2) timeout mechanisms on image parsing operations to fail fast and prevent hangs; (3) restrict image-size usage to internal and pre-validated image sources only; (4) apply OS-level resource limits (CPU time, memory) on image processing processes to contain impact; (5) disable JXL, HEIF, and JP2 format support in applications that do not require these formats; (6) isolate image processing in containerized or sandboxed environments to prevent cascading service failures; (7) deploy network-level controls (WAF, firewall rules) to block requests with malformed image headers.

Threat Intelligence Overview

EPSS Score
0.1%
Top 72% exploitable
Threat Intel
1
1 sources
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor 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 HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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.

Vendor StatusVendor

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