Axios: ReDoS in fromDataURI data: URL parser freezes the Node event loop (DoS)
## Summary 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. ## Impact 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 Functionality Affected: - Node.js HTTP adapter data URL handling. - `axios.get()` or equivalent calls where `config.url` has the `data:` protocol. Not affected: - Browser fetch/XHR URL handling. - Node requests where the application rejects `data:` URLs before calling axios. - Older checked `0.x` data URL parser shape unless separately proven vulnerable. ## Technical Details `lib/helpers/fromDataURI.js` contains: ```js const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/; ``` The `[^,;]+` groups include `/`, so a long string of slashes without a comma can be partit
GHSA-c29m-xwm3-cm6r
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-c29m-xwm3-cm6r
axios
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.20.0
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.16.1"
},
{
"fixed": "1.20.0"
}
]
}
],
"package": {
"name": "axios",
"purl": "pkg:npm/axios",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-c29m-xwm3-cm6r/GHSA-c29m-xwm3-cm6r.json"
}
}
]- Related CVEs
- CVE-2026-101903
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #37695 · Revision 1
- Added to Heist Feed
- Publisher date