Security: vulnerable dependency image-size (CVE-2025-71329/71330) — maintained drop-in available

Author: lcf2212devCreated Aug 10, 2026Updated Aug 10, 2026

Context

This package depends on npm image-size. Upstream is archived and the latest release (2.0.2) remains affected by:

  • CVE-2025-71329 — DoS via infinite loop (JXL/HEIF/JP2 zero-size boxes)
  • CVE-2025-71330 — DoS via infinite loop (ICNS zero entry length)

npm audit fix will not switch package names automatically.

Maintained drop-in

Community MIT fork with the same public API as [email protected]:

Not affiliated with the original image-size maintainer — honest community fork only.

Migration options

A — Direct dependency

bash
npm install image-size-next
diff
- import { imageSize } from 'image-size'
+ import { imageSize } from 'image-size-next'

B — Force transitive resolution (npm 8.3+)

json
{
  "overrides": {
    "image-size": "npm:[email protected]"
  }
}

Ask

Happy to open a PR for react-native-desktop if useful. Thanks for maintaining open source.

cc @ptmt