Back to Blog
high SEVERITY7 min read

How Proxy-Authorization Header Leakage Happens in Axios and How to Fix It

A high-severity vulnerability (CVE-2026-44486) in Axios versions prior to 1.16.0 caused Proxy-Authorization headers to leak to redirect targets when the HTTP client re-evaluated proxy settings and switched to a direct connection. This information disclosure bug exposed sensitive proxy credentials to unintended destinations, and was fixed by upgrading from Axios 1.15.2 to 1.18.0 in the client application.

O
By Orbis AppSec
Published August 19, 2026Reviewed August 19, 2026

Answer Summary

CVE-2026-44486 is a high-severity information disclosure vulnerability in Axios (CWE-200) where Proxy-Authorization headers leak to HTTP redirect targets when the client switches from proxied to direct connections. The vulnerability affects Axios versions before 1.16.0 and 0.32.0, exposing proxy credentials to unintended servers during redirect chains. The fix requires upgrading to Axios 1.18.0 or later, which properly strips proxy authentication headers when connections are re-evaluated to bypass the proxy.

Vulnerability at a Glance

cweCWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)
fixUpgrade Axios from 1.15.2 to 1.18.0 to properly handle header sanitization during redirect flows
riskProxy credentials exposed to redirect targets during connection re-evaluation
languageJavaScript (Node.js)
root causeAxios failed to strip Proxy-Authorization headers when switching from proxy to direct connection during redirects
vulnerabilityProxy-Authorization Header Leakage via HTTP Redirects

Introduction

In a client application's dependency tree, we discovered a high-severity information disclosure vulnerability in Axios 1.15.2 that could expose proxy authentication credentials to unintended servers. The vulnerability, tracked as CVE-2026-44486, exists in the client/package-lock.json dependency manifest where Axios was pinned at version 1.15.2. When an HTTP request configured to use a proxy server encounters a redirect, and Axios re-evaluates the connection to bypass the proxy for the redirect target, the Proxy-Authorization header—containing sensitive credentials—was not stripped from the outgoing request. This meant that proxy usernames and passwords could be leaked to arbitrary third-party servers during redirect chains.

The vulnerable dependency was identified by Trivy scanner, which flagged the specific pattern where proxy credentials could be disclosed through HTTP redirects. The fix involved upgrading Axios from version 1.15.2 to 1.18.0 across both client/package.json and client/pnpm-lock.yaml, ensuring the HTTP client properly sanitizes proxy-specific headers during connection re-evaluation.

The Vulnerability Explained

The Proxy-Authorization header is used to authenticate with HTTP proxy servers. It typically contains credentials in the format Basic base64(username:password). In normal operation, this header should only be sent to the proxy server itself, never to the final destination server.

Here's what happened in Axios 1.15.2:

  1. A client application makes an HTTP request through a configured proxy server
  2. The request includes a Proxy-Authorization header with credentials
  3. The proxy server responds with an HTTP redirect (301, 302, 307, 308)
  4. Axios re-evaluates the connection and determines the redirect target doesn't require proxying
  5. The vulnerability: Axios switches to a direct connection but fails to remove the Proxy-Authorization header
  6. The sensitive proxy credentials are sent directly to the redirect target server

Looking at the dependency configuration before the fix:

"axios": "^1.14.0",

And in the lock file:

axios:
  specifier: ^1.14.0
  version: 1.15.2

The application was using Axios 1.15.2, which contained the vulnerable redirect handling logic. When the HTTP client processed redirects and switched from proxied to direct connections, it didn't properly sanitize the header collection.

Real-World Attack Scenario

Consider this attack scenario specific to the client application:

  1. An attacker controls a web service that the client application might interact with (perhaps through user-supplied URLs or API integrations)
  2. The client application runs behind a corporate proxy requiring authentication
  3. The attacker's service returns an HTTP 302 redirect to a domain under their control
  4. When Axios follows the redirect and determines it doesn't need the proxy for the new destination, it switches to a direct connection
  5. The Proxy-Authorization header (containing corporate proxy credentials) is sent to the attacker's server
  6. The attacker now has valid proxy credentials that could be used to:
    - Access internal resources through the corporate proxy
    - Pivot to other internal systems
    - Mask malicious traffic as legitimate by using stolen proxy credentials

The impact is particularly severe in environments where:
- Proxy credentials grant access to sensitive internal networks
- The same proxy credentials are shared across multiple users or services
- Proxy logs are used for security monitoring (stolen credentials could enable undetected access)

The Fix

The fix involved upgrading Axios to version 1.18.0, which includes proper header sanitization during redirect handling. Here's what changed:

Before (client/package.json):

"dependencies": {
  "@stellar/freighter-api": "^6.0.1",
  "axios": "^1.14.0",
  "chart.js": "^4.5.1",
  // ... other dependencies
}

After (client/package.json):

"dependencies": {
  "@stellar/freighter-api": "^6.0.1",
  "axios": "^1.18.0",
  "chart.js": "^4.5.1",
  // ... other dependencies
}

Before (client/pnpm-lock.yaml):

axios:
  specifier: ^1.14.0
  version: 1.15.2

After (client/pnpm-lock.yaml):

axios:
  specifier: ^1.18.0
  version: 1.18.0

The upgrade from 1.15.2 to 1.18.0 brings in the security fix that was introduced in Axios 1.16.0. The updated version includes logic that:

  1. Tracks connection type changes: Monitors when a request transitions from proxied to direct connection
  2. Identifies proxy-specific headers: Recognizes headers like Proxy-Authorization that should only be sent to proxies
  3. Sanitizes headers during redirects: Removes proxy-specific headers when following redirects to direct connections
  4. Preserves valid headers: Maintains other authentication headers (like Authorization) that are legitimately intended for the destination server

The fix required changes to both files because:
- package.json defines the acceptable version range for the dependency
- pnpm-lock.yaml pins the exact resolved version and ensures reproducible builds

By updating both files, the fix ensures that:
- New installations will get Axios 1.18.0 or later
- Existing installations will upgrade to the secure version on next pnpm install
- The lock file prevents accidental downgrades to vulnerable versions

Key Takeaways

  • Axios versions before 1.16.0 leak Proxy-Authorization headers when switching from proxied to direct connections during HTTP redirects, exposing proxy credentials to redirect targets
  • The client application's dependency on Axios 1.15.2 in client/package-lock.json created a direct path for credential disclosure through the HTTP client's redirect handling
  • Upgrading to Axios 1.18.0 eliminates the vulnerability by implementing proper header sanitization that strips proxy-specific authentication from requests during connection re-evaluation
  • Both package.json and pnpm-lock.yaml required updates to ensure the secure version is enforced across all installations and prevent version drift back to vulnerable releases
  • Trivy scanner successfully detected this CVE-2026-44486 pattern in the dependency manifest, demonstrating the value of automated vulnerability scanning in CI/CD pipelines

How Orbis AppSec Detected This

  • Source: Axios dependency declaration in client/package.json and resolved version in client/package-lock.json
  • Sink: Axios HTTP client redirect handling logic that forwards headers during proxy-to-direct connection transitions
  • Missing control: Header sanitization during connection type re-evaluation; Proxy-Authorization headers were not stripped when switching from proxied to direct connections during redirects
  • CWE: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)
  • Fix: Upgraded Axios from 1.15.2 to 1.18.0, which includes the security patch that properly removes proxy-specific headers during redirect flows

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-44486 demonstrates how subtle flaws in HTTP client redirect handling can lead to serious information disclosure vulnerabilities. The leakage of Proxy-Authorization headers during connection re-evaluation could expose corporate proxy credentials to malicious third parties, enabling unauthorized access to internal networks and resources. By upgrading Axios from 1.15.2 to 1.18.0, the client application now properly sanitizes proxy-specific headers during redirects, preventing credential leakage.

This vulnerability underscores the importance of keeping HTTP client libraries up to date and implementing defense-in-depth strategies for handling sensitive authentication data. Regular dependency audits, automated vulnerability scanning, and careful header management during redirects are essential practices for maintaining secure applications. Always treat authentication credentials—whether for proxies, APIs, or services—as highly sensitive data that requires explicit protection at every layer of your application.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #758

Related Articles

high

How Denial of Service via Prototype Pollution happens in Axios and how to fix it

Axios versions prior to 1.15.1 merged untrusted configuration objects without guarding against the `__proto__` key, letting attacker-controlled input pollute `Object.prototype` and crash or destabilize applications. Upgrading axios (and its transitive dependencies `form-data`, `follow-redirects`, `proxy-from-env`) closes this Denial of Service and prototype-pollution attack surface without changing any application code.

critical

How SSRF via Vulnerable Dependency Versions Happens in Node.js and How to Fix It

A permissive semver range in `package.json` allowed npm to install axios versions vulnerable to SSRF (CVE-2024-39338). By bumping the minimum version from `^1.6.0` to `^1.7.4`, all downstream consumers of this SDK are now protected from server-side request forgery attacks. This critical fix required changing just one line in the dependency manifest.

critical

How Server-Side Request Forgery happens in Node.js maintenance scripts and how to fix it

A critical Server-Side Request Forgery (SSRF) vulnerability was discovered in `maintenance/getImages.js`, where the `getImage()` function passed database-sourced URLs directly to `axios.get()` without any validation. An attacker who could modify the elements database could redirect these requests to internal network resources — including AWS cloud metadata endpoints — potentially exposing IAM credentials and other sensitive infrastructure data. The fix introduces a strict URL allowlist that limi

high

How SSRF and Credential Leakage happens in Node.js axios and how to fix it

CVE-2025-27152 is a high-severity vulnerability in axios versions prior to 1.8.2 that allows Server-Side Request Forgery (SSRF) and credential leakage when absolute URLs are passed in requests. By upgrading from the vulnerable `^1.7.4` range (which resolved to `1.7.9`) to the pinned `1.8.2`, the attack surface for intercepting or redirecting authenticated HTTP requests is eliminated. Any Node.js application that passes user-influenced URLs to axios is potentially affected.

high

How HTTP Transport Hijacking via Prototype Pollution happens in JavaScript and how to fix it

CVE-2026-42033 is a high-severity prototype pollution vulnerability in axios that allows attackers to hijack the HTTP transport layer used by the library. The deltamod project was running axios 1.14.0, which lacked the hardened transport configuration introduced in 1.18.0 — including an explicit `https-proxy-agent` dependency and an upgraded `follow-redirects` floor. Upgrading to axios 1.18.0 closes the attack surface by ensuring that object prototype manipulation cannot silently redirect or int

high

How Denial of Service via Unbounded Data Happens in JavaScript and how to fix it

CVE-2025-58754 is a high-severity Denial of Service vulnerability in the popular axios HTTP client library, caused by the absence of a data size check on incoming response or request payloads. An attacker who can influence the size of data processed by axios could exhaust server memory or CPU, bringing down dependent Node.js applications. The fix upgrades axios from version 1.8.4 to 1.18.0, closing the unbounded data processing path.