Description
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.
Published: 2026-06-09
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the findBox function of the image-size library. When processing specially crafted JXL, HEIF, or JP2 images that contain boxes with a declared size of zero, the function enters an infinite loop, causing the host application to hang indefinitely. This denial of service can be triggered remotely by supplying such malicious image files, potentially affecting any service that uses image-size for validation or parsing. The weakness is classified as CWE-835, representing an infinite loop.

Affected Systems

The issue affects the image-size JavaScript library versions 1.1.0 through 1.2.0 inclusive and 2.0.0 through 2.0.1 inclusive. Applications that incorporate these older releases—whether in Node.js runtimes, static site generators, or client-side bundles—are vulnerable if they accept user-supplied images of the susceptible formats. No vendor-specific product names were provided beyond the library itself.

Risk and Exploitability

The CVSS score of 8.7 places this vulnerability in the high severity range, and the EPSS score is unavailable, leaving the exploitation probability unknown but potentially high because any attacker can craft a simple image file. The vulnerability is not listed in the CISA KEV catalog, but its impact is severe enough that systems can experience prolonged downtime if an attacker forces an application to become unresponsive. The likely attack vector is remote, applied through upload or ingestion of a malicious image; an attacker does not require privileged access or additional exploits to trigger the loop.

Generated by OpenCVE AI on June 9, 2026 at 22:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the image-size library to version 1.2.1 or later, or version 2.0.2 or later, depending on the major version in use.
  • If an upgrade is not immediately possible, implement input validation to reject any image file where the findBox function reports a box size of zero before allowing processing to continue.
  • Audit all code paths that use image-size for image validation and ensure that the library is called only after legitimate format checks have passed.
  • If feasible, add a timeout or watchdog around image processing routines to recover from potential hangs caused by infinite loops.

Generated by OpenCVE AI on June 9, 2026 at 22:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m5qc-5hw7-8vg7 image-size Denial of Service via Infinite Loop during Image Processing
History

Tue, 09 Jun 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title image-size < 1.2.1, 2.0.2 - Denial of Service via Infinite Loop in findBox Function
Weaknesses CWE-835
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 8.7, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-06-09T19:57:16.125Z

Reserved: 2026-06-08T20:44:31.209Z

Link: CVE-2025-71319

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-09T21:17:03.153

Modified: 2026-06-09T21:17:03.153

Link: CVE-2025-71319

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-09T22:15:15Z

Weaknesses