Categories
CVE-2025-62718 critical CVSS 9.9

Vulnerability in axios (CVE-2025-62718)

Summary

Vulnerability in axios (CVE-2025-62718). Confidential information can be exposed externally. Exploitable via NO_PROXY. Mitigation: upgrade to 0.31.0 or later.

Original description

The description as published by the source.

Axios does not correctly handle hostname normalization when checking NO_PROXY rules.
Requests to loopback addresses like localhost. (with a trailing dot) or [::1] (IPv6 literal) skip NO_PROXY matching and go through the configured proxy.

This goes against what developers expect and lets attackers force requests through a proxy, even if NO_PROXY is set up to protect loopback or internal services.

According to RFC 1034 §3.1 and RFC 3986 §3.2.2, a hostname can have a trailing dot to show it is a fully qualified domain name (FQDN). At the DNS level, localhost. is the same as localhost.
However, Axios does a literal string comparison instead of normalizing hostnames before checking NO_PROXY. This causes requests like http://localhost.:8080/ and http://[::1]:8080/ to be incorrectly proxied.

This issue leads to the possibility of proxy bypass and SSRF vulnerabilities allowing attackers to reach sensitive loopback or internal services despite the configured protections.


PoC

import http from "http";
import axios from "axios";

const proxyPort = 5300;

http.createServer((req, res) => {
  console.log("[PROXY] Got:", req.method, req.url, "Host:", req.headers.host);
  res.writeHead(200, { "Content-Type": "text/plain" });
  res.end("proxied");
}).listen(proxyPort, () => console.log("Proxy", proxyPort));

process.env.HTTP_PROXY…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2025-62718 has been found in axios.
Attackers can target a specific entry point like NO_PROXY over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 9.9/10.
What to do: upgrade axios to 0.31.0 or later.
If unsure, ask your IT team or search "axios CVE-2025-62718" on the vendor's site.

CVE-2025-62718 (axios) — CWE-441 / CVSS v3 9.9
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: NO_PROXY / localhost. / localhost
Patched: 0.31.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-441) exists in axios. Attackers reach the vulnerable code path via NO_PROXY without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of axios. Attack surface: NO_PROXY / localhost. / localhost.

🔥 Severity

Severity: Critical (CVSS 9.9/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 0.31.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'axios' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'axios' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で axios を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade axios to 0.31.0

    ステージング環境で 0.31.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm axios
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.31.0"}]}]

Fix status by distribution

Fixed packages published by each distribution for this CVE

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details