Skip to content

← Public intelligence

npm package

image-size

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.7npmAmendedPublished

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

    CVE-2025-71330 · GHSA-w3rx-r6r6-pgpr

    Affected
    • npm image-size >= 0.6.3, <= 2.0.2
    Fixed in
    2.0.3· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 2.0.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 8.7npmAmendedPublished

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

    CVE-2025-71329 · GHSA-5p2g-fcmc-qvqq

    Affected
    • npm image-size >= 1.2.0, <= 2.0.2
    Fixed in
    2.0.3· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 2.0.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 8.7npmAmendedPublished

    image-size Denial of Service via Infinite Loop during Image Processing

    CVE-2025-71319 · GHSA-m5qc-5hw7-8vg7

    Affected
    • npm image-size >= 1.1.0, < 1.2.1; >= 2.0.0, < 2.0.2
    Fixed in
    2.0.21.2.1· Vendor fix available
    Issue
    image-size is vulnerable to a Denial of Service vulnerability when processing specially crafted images. The issue occurs because of an infine loop in findBox when processing certain images with a box with size 0. Details If the first bytes of the input does not match any bytes in firstBytes, then the package tries to validate the image using other handlers: Some handlers that call findBox to validate or calculate the image size are jxl, heif and jp2. JXL handler calls findBox inside validate. To reach the findBox call, the value at position 4:8 should be 'JXL ' findBox can lead to an infinite loop because the value of box.size is 0, thus the offset variable is not updated. Below relevant code with comments (using one of the PAYLOAD below as example): A similar issue occurs for HEIF and JP2 handlers: - https://github.com/image-size/image-size/blob/v1.2.0/lib/types/heif.ts - https://github.com/image-size/image-size/blob/v1.2.0/lib/types/jp2.ts PoC Usage: - poc for…

    Recommended action: Upgrade to 2.0.2 or 1.2.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →