Intel

AIKIDO-2026-86953

probe-image-size is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-gjj5-9665-rwrc Published 2 days ago

75

High Risk

This Affects:

JSprobe-image-size
2.0.0 - 7.3.0
Fixed in 7.4.0
Are you affected? Scan for Free

TL;DR

The SVG header parser scans input with a searching regular expression that is not anchored, so input containing many < characters but no > restarts the scan at each position and runs in quadratic time. The synchronous path applies no size cap and the streaming path re-scans the whole accumulated buffer on every chunk, so a crafted image pins the Node.js event loop at full CPU. Every entry point that reaches the SVG parser is exposed, including remote URL fetches where the input is supplied via a link. The fix anchors the header regular expression with deterministic parsing and limits inspected SVG header data to the first 10 KiB in both the sync and stream paths.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and pass untrusted image data to probe-image-size via probe.sync(buffer), probe(stream), or probe(url) (including user-supplied image URLs).

Background info

probe-image-size is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 2.0.0 - 7.3.0.

How to fix this

Upgrade the probe-image-size library to the patch version.