Packages / image-size / Security
image-size: ICNS parser allows denial of service through an infinite loop
Affected releases · image-size
- 2.x2.0.0 – 2.0.2Fixed in 2.0.3
- 1.x and older0.6.3 – 1.2.1No fix, no longer updated
On 2.x, the newest line:
npm install image-size@2.0.3Every release on a timeline
Affected
2.0.0 – 2.0.2
3 releases
Fixed
2.0.3 – 2.1.0
3 releases, latest
Affected
1.0.0 – 1.2.1
7 releases
Not affected
0.0.2 – 0.6.2
37 releases
Affected
0.6.3 – 0.9.7
18 releases
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.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.