CVE-2025-71329: image-size Denial of Service Vulnerability
HIGHCVE-2025-71329 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting image-size libraries in the npm ecosystem. The issue involves jxl and heif parsers allow denial of service through infinite loops. Remediation is available by upgrading affected packages to version 2.0.3.
CVE-2025-71329 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2025-71329
To remediate this vulnerability, upgrade all affected image-size dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install image-size@2.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls image-size
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-71329, inspect your project dependencies using npm:
npm ls image-size
Analyze the terminal output to locate any version of image-size in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), your application is affected.
Note: The npm ls image-size command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In image-size, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-71329 Affected image-size Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
image-size
|
npm |
≥ 1.2.0
< 2.0.3
|
2.0.3
|
References
Frequently Asked Questions
What is CVE-2025-71329?
Which image-size versions are affected?
What version fixes CVE-2025-71329?
Is image-size affected?
What is the CVSS score of CVE-2025-71329?
What CWE is associated with CVE-2025-71329?
How can I check npm dependencies for CVE-2025-71329?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5p2g-fcmc-qvqq",
"modified" : "2026-09-24T18:28:03Z",
"published" : "2026-06-10T15:31:30Z",
"aliases" : [ "CVE-2025-71329" ],
"summary" : "image-size: JXL and HEIF parsers allow denial of service through infinite loops",
"details" : "image-size through 2.0.2 contains a denial of service vulnerability that allows remote attackers to permanently block the Node.js event loop by supplying a specially crafted image buffer with a zero-valued size field in a recognized box-type. Attackers can trigger an infinite loop in the JXL or HEIF image parsers by providing a crafted image containing a box with a size of zero, causing the offset to never advance and permanently hanging the application.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "image-size"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0"
}, {
"fixed" : "2.0.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-71329"
}, {
"type" : "WEB",
"url" : "https://codeberg.org/image-size/image-size/commit/e6e83a5578961de81f6d5834d90fb7430d8f29a5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/image-size/image-size"
}, {
"type" : "WEB",
"url" : "https://joshua.hu/image-size-infinite-loop-dos-vulnerabilities"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20260224152152/https://github.com/image-size/image-size/pull/439"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/image-size-denial-of-service-via-infinite-loop-in-jxl-heif-parser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-07T20:54:40Z",
"nvd_published_at" : "2026-06-10T14:16:30Z"
}
}