probe-image-size is vulnerable to Regular Expression Denial of Service (ReDoS)
75
High Risk
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.
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).
probe-image-size is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 2.0.0 - 7.3.0.
Upgrade the probe-image-size library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant