CVE-2026-104861 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in probe-image-size. A fix is available for probe-image-size — see the affected versions and patch details below.
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-104861.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-104861 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 383,485 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
probe-image-sizenpmDescription
Overview
probe-image-size scans the SVG header with a searching regular expression, /<[-_.:a-zA-Z0-9][^>]*>/. On input that contains many < characters but no >, the engine restarts the [^>]* scan at every < position and runs to end of input each time, giving quadratic time complexity.
Both the synchronous and the streaming parser are affected.
Impact
Every entry point that reaches the SVG parser is affected: probe.sync(), probe(stream) and probe(url). The URL form is the most exposed one — the input is fetched from a remote host, so an attacker only needs to supply a link.
Processing a crafted buffer blocks the Node.js event loop at 100% CPU for the whole duration. In production environments such as upload validators, image proxies or link unfurl services, a small number of concurrent requests is enough to deny service.
Root Cause Analysis
Two independent problems.
-
Absence of input size cap in the sync path.
lib/parse_sync/svg.jscopied the entire buffer into a string and matched against it. There was no size limit at all, so cost scaled with the size of the attacker-supplied buffer. -
Repeated rescanning in the stream path.
lib/parse_stream/svg.jsdid cap accumulated data at 64 KB, but calledparseSvg(str)on the whole accumulated string on every chunk, givingO(chunks × N²). The cap does not help here: the more chunks the input is split into, the more times the quadratic scan is repeated.Chunk size is influenced by the sender.
highWaterMark(16 KB) is a buffering threshold, not a lower bound — a socket read returns whatever has arrived. A server that writes one byte at a time produces one-byte chunks; this was confirmed against the realneedlepipeline with default options.
The original report identified (1) only, and stated that the 64 KB cap mitigates the streaming path. It does not.
Proof of Concept (PoC)
Synchronous:
const probe = require('probe-image-size')
// ~200 KB of '<a' — contains '<' but never '>'
probe.sync(Buffer.from('<a'.repeat(100000), 'latin1'))
Streaming — the same payload split into chunks, slower per byte than the synchronous form:
const { Readable } = require('stream')
const probe = require('probe-image-size')
const payload = Buffer.from('<a'.repeat(32768), 'latin1')
const chunks = []
for (let i = 0; i < payload.length; i += 4096) chunks.push(payload.subarray(i, i + 4096))
await probe(Readable.from(chunks))
Measurements on the maintainer's machine:
| path | input | time |
|---|---|---|
probe.sync() | 25 KB | 0.9 s |
probe.sync() | 50 KB | 5.5 s |
probe.sync() | 100 KB | 18 s |
probe.sync() | 200 KB | 54 s |
probe(stream) | 64 KB, 1 chunk | 1.6 s |
probe(stream) | 64 KB, 4 chunks | 2.9 s |
probe(stream) | 64 KB, 16 chunks | 9.6 s |
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | probe-image-size | all versions | 7.4.0npm install probe-image-size@7.4.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for probe-image-size, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update probe-image-size to 7.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-104861 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is CVE-2026-104861 in your dependencies?
Find it across npm, including transitive dependencies.