CVE-2026-104861
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
probe-image-size gets image dimensions without downloading the entire file. Prior to 7.4.0, lib/parse_sync/svg.js and lib/parse_stream/svg.js use the searching regular expression /<[-_.:a-zA-Z0-9][^>]*>/, which repeatedly scans to the end of input when attacker-controlled data contains many less-than characters without a closing greater-than character. The synchronous parser converts and scans the full supplied buffer without an input cap, while the streaming parser reparses the complete accumulated SVG prefix for every received chunk. The probe.sync(), probe(stream), and probe(url) entry points can therefore block the Node.js event loop at full CPU, and attacker-controlled chunking can amplify the streaming cost. This issue is fixed in version 7.4.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
probe-image-size gets image dimensions without downloading the entire file. Prior to 7.4.0, lib/parse_sync/svg.js and lib/parse_stream/svg.js use the searching regular expression /<[-_.:a-zA-Z0-9][^>]*>/, which repeatedly scans to the end of input when attacker-controlled data contains many less-than characters without a closing greater-than character. The synchronous parser converts and scans the full supplied buffer without an input cap, while the streaming parser reparses the complete accumulated SVG prefix for every received chunk. The probe.sync(), probe(stream), and probe(url) entry points can therefore block the Node.js event loop at full CPU, and attacker-controlled chunking can amplify the streaming cost. This issue is fixed in version 7.4.0.
- Record
CVE-2026-104861- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
EUVDEUVD-2026-91768
7.5
probe-image-size gets image dimensions without downloading the entire file. Prior to 7.4.0, lib/parse_sync/svg.js and lib/parse_stream/svg.js use the searching regular expression /<[-_.:a-zA-Z0-9][^>]*>/, which repeatedly scans to the end of input when attacker-controlled data contains many less-than characters without a closing greater-than character. The synchronous parser converts and scans the full supplied buffer without an input cap, while the streaming parser reparses the complete accumulated SVG prefix for every received chunk. The probe.sync(), probe(stream), and probe(url) entry points can therefore block the Node.js event loop at full CPU, and attacker-controlled chunking can amplify the streaming cost. This issue is fixed in version 7.4.0.
- Record
EUVD-2026-91768- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-gjj5-9665-rwrc
7.5
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
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 |
- Record
GHSA-gjj5-9665-rwrc- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
NVD
7.5
probe-image-size gets image dimensions without downloading the entire file. Prior to 7.4.0, lib/parse_sync/svg.js and lib/parse_stream/svg.js use the searching regular expression /<[-_.:a-zA-Z0-9][^>]*>/, which repeatedly scans to the end of input when attacker-controlled data contains many less-than characters without a closing greater-than character. The synchronous parser converts and scans the full supplied buffer without an input cap, while the streaming parser reparses the complete accumulated SVG prefix for every received chunk. The probe.sync(), probe(stream), and probe(url) entry points can therefore block the Node.js event loop at full CPU, and attacker-controlled chunking can amplify the streaming cost. This issue is fixed in version 7.4.0.
- Record
CVE-2026-104861- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
OSV
7.5
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
probe-image-size gets image dimensions without downloading the entire file. Prior to 7.4.0, lib/parse_sync/svg.js and lib/parse_stream/svg.js use the searching regular expression /<[-_.:a-zA-Z0-9][^>]*>/, which repeatedly scans to the end of input when attacker-controlled data contains many less-than characters without a closing greater-than character. The synchronous parser converts and scans the full supplied buffer without an input cap, while the streaming parser reparses the complete accumulated SVG prefix for every received chunk. The probe.sync(), probe(stream), and probe(url) entry points can therefore block the Node.js event loop at full CPU, and attacker-controlled chunking can amplify the streaming cost. This issue is fixed in version 7.4.0.
- Record
CVE-2026-104861- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333, CWE-400
- Updated
- 2026-11-02
OSVGHSA-gjj5-9665-rwrc
7.5
probe-image-size: Quadratic-time Denial of Service in the SVG Parser
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 |
- Record
GHSA-gjj5-9665-rwrc- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333, CWE-400
- Updated
- 2026-11-02
OSVCLSA-2026-1791028047 No score
TuxCare security update for probe-image-size (1 CVE)
TuxCare rebuilt probe-image-size to address 1 CVE. Fixed in 7.3.0-tuxcare.1.
- Record
CLSA-2026-1791028047- Updated
- 2026-11-02
OSVCLSA-2026-1792489910 No score
TuxCare security update for probe-image-size (1 CVE)
TuxCare rebuilt probe-image-size to address 1 CVE. Fixed in 6.0.0-tuxcare.1.
- Record
CLSA-2026-1792489910- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
probe-image-sizenpm |
through 7.3.0 | 7.4.0 |
probe-image-sizeTuxCare:npm |
7.3.0-tuxcare.0 up to 7.3.0-tuxcare.1, plus listed versions 7.3.0 |
7.3.0-tuxcare.1 |
probe-image-sizeTuxCare:npm |
6.0.0-tuxcare.0 up to 6.0.0-tuxcare.1, plus listed versions 6.0.0 |
6.0.0-tuxcare.1 |
probe-image-sizenpm |
before 7.4.0 | 7.4.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-104861 is a high vulnerability (CVSS 7.5) in Nodeca Probe-image-size, published October 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in probe-image-size 7.4.0.
References
github.com/nodeca/probe-image-size/security/advisories/GHSA-gjj5-9665-rwrc
github.com/nodeca/probe-image-size/commit/60cc96ac0b671e79e328213d0a8e831312b09e84
github.com/nodeca/probe-image-size/commit/9b74656d6f973cc59ea2ab1375c0d88390a402ad
github.com/nodeca/probe-image-size/commit/c032aefabdecf5cb50548ab9ba175db56353078f
github.com/nodeca/probe-image-size/releases/tag/7.4.0
nvd.nist.gov/vuln/detail/CVE-2026-104861
github.com/advisories/GHSA-gjj5-9665-rwrc
github.com/CVEProject/cvelistV5/tree/main/cves/2026/104xxx/CVE-2026-104861.json
github.com/nodeca/probe-image-size