Packages / image-size / Security

HighVulnerabilityGHSA-5p2g-fcmc-qvqqCVE-2025-71329Published 10 Jun 2026

image-size: JXL and HEIF parsers allow denial of service through infinite loops

Your version

Affected releases · image-size

  • 2.x2.0.0 – 2.0.2Fixed in 2.0.3
  • 1.x1.2.0 – 1.2.1No fix on this line yet

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. Not affected

    1.0.0 – 1.1.1

    5 releases

  2. Affected

    1.2.0 – 1.2.1

    2 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 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.

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.