---
title: "GHSA-w3rx-r6r6-pgpr: image-size: ICNS parser allows denial of service through an infinite loop"
description: "High severity. image-size: ICNS parser allows denial of service through an infinite loop. Affects image-size; fixed in 2.0.3."
url: https://inlinr.com/advisories/GHSA-w3rx-r6r6-pgpr
lang: en
---

[Packages](https://inlinr.com/packages) / [image-size](https://inlinr.com/packages/image-size) / [Security](https://inlinr.com/packages/image-size/security)

High Vulnerability GHSA-w3rx-r6r6-pgpr CVE-2025-71330 Published 10 Jun 2026

# image-size: ICNS parser allows denial of service through an infinite loop

Your version 

Affected releases · [image-size](https://inlinr.com/packages/image-size)

- 2.x 2.0.0 – 2.0.2 Fixed in 2.0.3
- 1.x and older 0.6.3 – 1.2.1 No fix, no longer updated

On 2.x, the newest line:

```
npm install image-size@2.0.3
```

Every release on a timeline

2.x 

1. Affected

2.0.0 – 2.0.2  
3 releases
2. Fixed

2.0.3 – 2.1.0  
3 releases, latest

1.x 

1. Affected

1.0.0 – 1.2.1  
7 releases

0.x 

1. Not affected

0.0.2 – 0.6.2  
37 releases
2. Affected

0.6.3 – 0.9.7  
18 releases

68 stable releases of image-size, oldest to newest, one row per major.

## What happens

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.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

CVSS:3.1/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:N/​I:N/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2025-71330 "https://nvd.nist.gov/vuln/detail/CVE-2025-71330")  
nvd.nist.gov/vuln/detail/CVE-2025-71330
- [Fix commit](https://codeberg.org/image-size/image-size/commit/e6e83a5578961de81f6d5834d90fb7430d8f29a5 "https://codeberg.org/image-size/image-size/commit/e6e83a5578961de81f6d5834d90fb7430d8f29a5")  
codeberg.org/image-size/image-size/commit/e6e83…
- [Package](https://github.com/image-size/image-size "https://github.com/image-size/image-size")  
github.com/image-size/image-size
- [Reference](https://joshua.hu/image-size-infinite-loop-dos-vulnerabilities "https://joshua.hu/image-size-infinite-loop-dos-vulnerabilities")  
joshua.hu/image-size-infinite-loop-dos-vulnerab…
- [Pull request](https://web.archive.org/web/20260224152152/https://github.com/image-size/image-size/pull/439 "https://web.archive.org/web/20260224152152/https://github.com/image-size/image-size/pull/439")  
web.archive.org/web/20260224152152/https://gith…
- [Reference](https://www.vulncheck.com/advisories/image-size-denial-of-service-via-malformed-icns-image-parsing "https://www.vulncheck.com/advisories/image-size-denial-of-service-via-malformed-icns-image-parsing")  
vulncheck.com/advisories/image-size-denial-of-s…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
