CVE-2025-71329 — image-size
Fix: image-size/image-size#439CVE-2025-71329 is a CWE-835 vulnerability in image-size. 1 public exploit reference exists, so weaponization risk is real. A fix is available for image-size — see the affected versions and patch details below.
image-size 2.0.2 Denial of Service via Infinite Loop in JXL/HEIF Parser
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-71329.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
image-sizenpmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | image-size | ≥ 1.2.0&&< 2.0.3 | 2.0.3npm install image-size@2.0.3 |
Affected Products
image-sizeimage-sizeResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for image-size, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update image-size to 2.0.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-71329 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in the image-size npm package. A crafted image buffer with a zero-valued size field in a recognized box-type (JXL or HEIF) can trigger an infinite loop, permanently blocking the Node.js event loop and causing a denial of service.
Upgrade to a version of image-size that validates box size fields. As a workaround, validate image inputs before passing them to image-size, rejecting files with zero-length box entries.Source: Red Hat security advisory for CVE-2025-71329 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenShift AI 3.4 | rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9:1787121387 | RHSA-2026:60520 |
Frequently Asked Questions
Is CVE-2025-71329 in your dependencies?
Find it across npm, including transitive dependencies.