AXIOS · CVE-2026-101903 · Package
FIX → 1.20.0 · >=1.20.0
Axios on Node.js parses data: URLs with a regular expression that backtracks heavily on a malformed URL made of many slashes. A single unauthenticated request can block the event loop for a long time, making the service unresponsive.
first public Sep 16, 2026 · 3 sources
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Applications running axios in Node.js that pass untrusted URL strings to axios without rejecting or constraining data: URLs are exposed. Browser fetch and XHR usage is not affected, and applications that reject data: URLs before calling axios are not affected.
Not affected if browser-only, data-url-rejected, no-untrusted-urls
Who cares axios, javascript, node, self-hosted
npm ls axios; affected range is >= 1.16.1, < 1.20.0 per the product data.axios.get or similar calls in the Node.js HTTP adapter.data: URLs before calling axios.Axios for Node.js parses data: URLs in lib/helpers/fromDataURI.js. The current RFC-2397 parser uses a regular expression whose media type groups allow / inside both sides of the type/subtype match. A malformed data: URL containing many slashes and no comma forces the JavaScript regex engine to try many possible placements for the separator before failing.
Applications are affected when they pass untrusted URL strings to axios and do not reject or constrain data: URLs before axios parses them.
An attacker can make the Node.js event loop spend significant synchronous CPU time parsing a single malformed URL. In a server that accepts a URL from an HTTP request and calls axios.get(url), this can block unrelated requests and health checks until parsing completes.
The issue is availability-only. It does not disclose data or modify requests.
Affected:
axios.get() or equivalent calls where has the protocol.Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
Upgrade to 1.20.0 · >=1.20.0
axios 1.20.0 (fixed in >=1.20.0 per the product ranges; the range >= 1.16.1 is listed as affected for all later versions in the data's first entry, so 1.20.0 is the stated fixed version)config.urldata:Not affected:
data: URLs before calling axios.0.x data URL parser shape unless separately proven vulnerable.lib/helpers/fromDataURI.js contains:
const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
The [^,;]+ groups include /, so a long string of slashes without a comma can be partitioned around the required \/ in many ways before the match fails. The match runs before axios can apply request timeout behavior, so timeout does not mitigate the parsing pause.
Local timing on axios 1.18.1 with small payloads showed about 2.4 ms at 1000 slashes, 16.6 ms at 3000 slashes, and 71.5 ms at 6000 slashes, consistent with the submitted quadratic scaling while avoiding long-running payloads.
Constrained helper-level demonstration:
import axios from 'axios';
await axios.get('data:' + '/'.repeat(6000));
The request fails after parsing, but the failure is delayed by synchronous regex work. Larger payloads increase the pause substantially.
Reject data: URLs before passing untrusted input to axios, or enforce a strict maximum URL length for URL-fetching endpoints. Applications that do not need data: URL support should deny that protocol explicitly.
fromDataURI data: URL parser freezes the event loop (DoS)axios (Node.js http adapter)v1.x, current release line)lib/helpers/fromDataURI.jsfromDataURI parses data: URLs with this regex:
// lib/helpers/fromDataURI.js:9
const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
The mediatype tokens [^,;]+ include /, so they can span multiple slashes ambiguously. A data: URL made of many slashes with no comma forces the engine to try every way to place the single \/ divider before failing — quadratic O(n²) backtracking. It runs synchronously on the main thread, so the whole Node event loop is frozen for the entire parse. Reachable through the public API on the Node http adapter (axios.get(url)); the browser fetch/xhr adapters are not affected because they do not call fromDataURI.
A configured timeout does not help: the freeze happens during parsing, before any network timer can fire.
import axios from 'axios';
// ~256 KB data: URL of pure slashes, no comma
await axios.get('data:' + '/'.repeat(262139)); // blocks the event loop ~6 min, then throws
Single-threaded "fetch a user-supplied URL" service (link-preview style) calling axios.get on a JSON body { "url": "..." }, with timeout: 1000 set.
Scaling is clean O(n²) (constant k ≈ 5.6e-6 ms/byte², stable across sizes):
| data: URL size | Event-loop freeze (one request) |
|---|---|
| 32 KB | 6.3 s (measured end-to-end; server logged event loop BLOCKED for 6.30s) |
| 64 KB | ~24 s |
| 128 KB | ~96 s |
| 256 KB | ~385 s (~6.4 min) |
| 1 MB | ~100 min |
During the freeze the server answers nothing: a /healthz liveness probe times out for the whole window, and the server's own event-loop monitor cannot even log until the parse finishes. In a run through an intercepting proxy, the proxy hit its 120 s upstream timeout and gave up, while the origin stayed pegged at 100% CPU on one core past that — client/proxy timeouts do not mitigate it.
The attacker controls only the URL string and needs no auth. ~256 KB every ~6 min (≈ 0.7 bytes/sec) keeps a server permanently unavailable.
Unauthenticated remote denial of service. One small request takes a Node service fully offline for minutes; a trickle keeps it down indefinitely.
CVSS 3.1: 7.5 (High) — AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
RFC 2045 type/subtype tokens never contain /. Excluding / from those two character classes removes the ambiguity and the backtracking:
const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
Worst-case parse drops from ~2600 ms to ~0.002 ms. All valid data: URLs, including slashes in the body, parse identically.
This page as .md · .json · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.