CVE-2025-71330: image-size Denial of Service Vulnerability
HIGHCVE-2025-71330 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 icns parser allows denial of service through an infinite loop. Remediation is available by upgrading affected packages to version 2.0.3.
CVE-2025-71330 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-71330
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-71330, 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-71330 Affected image-size Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
image-size
|
npm |
≥ 0.6.3
< 2.0.3
|
2.0.3
|
References
Frequently Asked Questions
What is CVE-2025-71330?
Which image-size versions are affected?
What version fixes CVE-2025-71330?
Is image-size affected?
What is the CVSS score of CVE-2025-71330?
What CWE is associated with CVE-2025-71330?
How can I check npm dependencies for CVE-2025-71330?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w3rx-r6r6-pgpr",
"modified" : "2026-09-24T18:23:10Z",
"published" : "2026-06-10T15:31:30Z",
"aliases" : [ "CVE-2025-71330" ],
"summary" : "image-size: ICNS parser allows denial of service through an infinite loop",
"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 ICNS image buffer. Attackers can craft an ICNS buffer containing valid magic bytes and a zero-valued entry length field to trigger an infinite loop in the ICNS parser, as the offset is never incremented when the entry length field is 0, causing the while loop condition to remain true indefinitely.",
"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "image-size"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.6.3"
}, {
"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-71330"
}, {
"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-malformed-icns-image-parsing"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-07T20:55:24Z",
"nvd_published_at" : "2026-06-10T14:16:30Z"
}
}