Back to Blog
high SEVERITY5 min read

How NO_PROXY bypass via crafted URL happens in Node.js axios and how to fix it

A high-severity vulnerability (CVE-2026-42043) was discovered in axios versions prior to 1.15.1, allowing attackers to bypass NO_PROXY configurations using specially crafted URLs. This could expose sensitive internal traffic to proxy servers, potentially leaking credentials or internal data. The fix upgrades axios to version 1.15.1, which properly validates URLs before applying proxy exclusion rules.

O
By Orbis AppSec
Published July 24, 2026Reviewed July 24, 2026

Answer Summary

CVE-2026-42043 is a NO_PROXY bypass vulnerability in the axios HTTP client for Node.js (CWE-918: Server-Side Request Forgery). Attackers can craft malicious URLs that circumvent NO_PROXY settings, causing requests intended for internal services to route through external proxies. The fix is to upgrade axios from version 1.15.0 to 1.15.1 or later, which implements proper URL validation before checking proxy exclusion rules.

Vulnerability at a Glance

cweCWE-918 (Server-Side Request Forgery)
fixUpgrade axios to version 1.15.1 or 0.31.1
riskInternal traffic exposure through unintended proxy routing
languageJavaScript/Node.js
root causeInsufficient URL validation before applying NO_PROXY exclusion rules
vulnerabilityNO_PROXY bypass via crafted URL

Introduction

In this Node.js project, a high-severity vulnerability was discovered in the axios HTTP client dependency. The yarn.lock file pinned axios at version 1.15.0, which contains a critical flaw in how it processes URLs when determining whether to apply NO_PROXY exclusion rules.

Looking at the dependency declaration in the project's .pnp.cjs file:

["axios", "npm:1.15.0"],

This version of axios is vulnerable to CVE-2026-42043, which allows attackers to craft URLs that bypass NO_PROXY configurations. For any Node.js application that relies on proxy exclusion rules to protect internal services, this vulnerability could expose sensitive traffic to external proxy servers.

The Vulnerability Explained

What is NO_PROXY and Why Does It Matter?

In enterprise environments, applications often use proxy servers to route external HTTP traffic. The NO_PROXY environment variable (or configuration option) specifies hosts that should bypass the proxy—typically internal services, localhost, or private network addresses.

For example, a typical configuration might look like:

HTTP_PROXY=http://corporate-proxy.example.com:8080
NO_PROXY=localhost,127.0.0.1,internal.company.com,.local

This tells axios: "Route external traffic through the proxy, but connect directly to internal services."

The Vulnerability Mechanism

CVE-2026-42043 exploits a flaw in how axios parses and validates URLs before checking them against NO_PROXY rules. An attacker can craft a URL that appears to match an internal host to the NO_PROXY check but actually resolves to a different destination—or vice versa.

Consider this attack scenario specific to the affected project:

// The project uses axios for HTTP requests
const axios = require('axios'); // version 1.15.0 - VULNERABLE

// Application expects this to bypass proxy (internal service)
// NO_PROXY includes 'internal.company.com'
const response = await axios.get('http://internal.company.com@attacker.com/api/data');

In vulnerable versions, the URL parsing inconsistency could cause:
1. Requests intended for NO_PROXY hosts to route through the proxy (leaking internal traffic)
2. Requests to external hosts to bypass the proxy (evading security controls)

Real-World Impact

For this specific project (update-adrules), which uses axios alongside @adguard/filters-downloader and @adguard/hostlist-compiler, the vulnerability is particularly concerning:

  1. Credential Exposure: If the application makes authenticated requests to internal APIs, those credentials could be exposed to proxy servers
  2. Data Leakage: Internal service responses could be logged or intercepted by proxy infrastructure
  3. Security Control Bypass: Requests that should go through security-inspecting proxies might bypass them entirely

As noted in the PR assessment: "This is a Node.js library - vulnerabilities affect downstream consumers who use this package."

The Fix

The fix is straightforward but critical: upgrade axios from version 1.15.0 to 1.15.1, which contains proper URL validation before applying proxy exclusion rules.

Before (Vulnerable)

// In .pnp.cjs (or yarn.lock)
["axios", "npm:1.15.0"],  // VULNERABLE

After (Fixed)

// In .pnp.cjs (or yarn.lock)
["axios", "npm:1.15.1"],  // PATCHED

The changes were scoped to two files:
- package.json: Updated the axios version constraint
- yarn.lock: Regenerated to lock the new secure version

What Changed in axios 1.15.1?

The axios maintainers fixed the URL parsing logic to:
1. Normalize URLs before comparing against NO_PROXY patterns
2. Properly handle URL edge cases (userinfo, encoded characters, unusual ports)
3. Ensure consistent parsing between the NO_PROXY check and the actual request destination

Prevention & Best Practices

1. Automated Dependency Scanning

Implement continuous dependency scanning in your CI/CD pipeline:

# Example GitHub Actions workflow
- name: Run Trivy vulnerability scanner
  uses: aquasecurity/trivy-action@master
  with:
    scan-type: 'fs'
    scan-ref: '.'
    severity: 'HIGH,CRITICAL'

2. Keep Dependencies Updated

Use tools like Dependabot or Renovate to automatically propose dependency updates:

// renovate.json
{
  "extends": ["config:base"],
  "vulnerabilityAlerts": {
    "enabled": true
  }
}

3. Lock File Hygiene

Always commit your lock files (yarn.lock, package-lock.json) and regularly audit them:

# Audit for known vulnerabilities
yarn audit
# or
npm audit

4. Defense in Depth

Don't rely solely on application-level proxy settings:
- Use network segmentation to isolate internal services
- Implement mutual TLS for internal service communication
- Monitor proxy logs for anomalous traffic patterns

5. URL Validation

When accepting URLs from external sources, validate them before passing to axios:

const { URL } = require('url');

function validateUrl(urlString) {
  try {
    const url = new URL(urlString);
    // Reject URLs with userinfo (user:pass@host)
    if (url.username || url.password) {
      throw new Error('URLs with credentials are not allowed');
    }
    return url.href;
  } catch (e) {
    throw new Error('Invalid URL');
  }
}

Key Takeaways

  • axios 1.15.0 has a critical NO_PROXY bypass vulnerability that can expose internal traffic to external proxy servers
  • URL parsing inconsistencies between proxy exclusion checks and actual request routing create security gaps
  • Dependency lock files (yarn.lock) must be actively monitored for vulnerable package versions
  • The fix requires upgrading to axios 1.15.1 or 0.31.1 - no code changes needed beyond the version bump
  • Projects using axios for internal service communication are at highest risk from this vulnerability

How Orbis AppSec Detected This

  • Source: The yarn.lock file declaring axios version 1.15.0 as a project dependency
  • Sink: Any HTTP request made through axios that relies on NO_PROXY configuration for routing decisions
  • Missing control: The vulnerable axios version lacked proper URL normalization before applying proxy exclusion rules
  • CWE: CWE-918 (Server-Side Request Forgery) - the vulnerability allows manipulation of HTTP request routing
  • Fix: Upgraded axios from 1.15.0 to 1.15.1, which implements correct URL validation before NO_PROXY checks

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-42043 demonstrates how subtle parsing inconsistencies in HTTP client libraries can have significant security implications. The NO_PROXY bypass vulnerability in axios 1.15.0 could expose internal traffic, leak credentials, or allow attackers to evade security controls.

The fix is simple—upgrade to axios 1.15.1—but the lesson is broader: dependency management is a critical security practice. Automated scanning tools can catch these issues before they reach production, and keeping dependencies updated is one of the most effective ways to maintain a secure application.

For Node.js developers, this vulnerability serves as a reminder that even well-maintained libraries like axios can have security issues. Regular dependency audits, automated scanning, and prompt patching are essential practices for secure software development.

References

Frequently Asked Questions

What is NO_PROXY bypass?

A NO_PROXY bypass occurs when an attacker crafts a URL that tricks the HTTP client into routing traffic through a proxy server despite the destination being listed in NO_PROXY exclusion rules, potentially exposing sensitive internal communications.

How do you prevent NO_PROXY bypass in Node.js?

Keep axios and other HTTP clients updated to the latest versions, validate and normalize URLs before making requests, and implement defense-in-depth by using network-level controls in addition to application-level proxy settings.

What CWE is NO_PROXY bypass?

NO_PROXY bypass vulnerabilities typically fall under CWE-918 (Server-Side Request Forgery) as they allow attackers to manipulate where HTTP requests are routed, potentially accessing internal resources through proxy manipulation.

Is setting NO_PROXY enough to prevent proxy bypass attacks?

No, NO_PROXY settings alone are insufficient if the HTTP client has parsing vulnerabilities. You must also keep your HTTP client library updated and validate URLs before making requests to ensure proper proxy exclusion behavior.

Can static analysis detect NO_PROXY bypass vulnerabilities?

Yes, static analysis tools like Trivy can detect known vulnerable versions of axios and other libraries. Dependency scanning combined with CVE databases effectively identifies these vulnerabilities before they reach production.

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #74

Related Articles

critical

How arbitrary code execution via injected protobuf definition type fields happens in Node.js and how to fix it

A critical arbitrary code execution vulnerability (CVE-2026-41242) was discovered in protobufjs versions prior to 7.5.5 and 8.0.1, allowing attackers to inject malicious code through crafted protobuf definition type fields. The fix upgrades the dependency from the vulnerable version 6.11.4 to 7.5.5, which properly sanitizes type field inputs during protobuf parsing. This vulnerability is especially dangerous because protobufjs is widely used in Node.js applications for serialization, meaning a s

high

How command injection happens in Node.js child_process and how to fix it

A high-severity command injection vulnerability was discovered in `bootstrap.js` at line 34, where the `exec()` function was used to run shell commands constructed from a `folder` variable. By replacing `exec()` with `execFile()` and passing arguments as an array, the fix eliminates the shell interpolation entirely, closing the door on command injection attacks that could have affected all downstream consumers of this Node.js library.

high

How unsafe pickle deserialization happens in NumPy's np.load() and how to fix it

A high-severity arbitrary code execution vulnerability was discovered in `tools/ardy-engine/retarget.py` where `np.load()` was called with `allow_pickle=True`, enabling attackers to embed malicious pickle payloads in `.npz` files. The fix was a single-character change—switching `allow_pickle=True` to `allow_pickle=False`—that eliminates the deserialization attack vector while preserving the file's legitimate array data loading functionality.

high

How SSRF and Credential Leakage via Absolute URLs happens in axios and how to fix it

A high-severity vulnerability (CVE-2025-27152) in axios versions prior to 1.8.2 allowed Server-Side Request Forgery (SSRF) attacks and credential leakage when making HTTP requests with absolute URLs. This vulnerability was fixed by upgrading from axios 1.7.4 to 1.8.2 in both package.json and package-lock.json, eliminating the attack vector that could have exposed authentication tokens and enabled unauthorized server-side requests.

high

How pickle-based arbitrary code execution happens in PyTorch and how to fix it

A high-severity arbitrary code execution vulnerability was discovered in `scripts/export_joyvasa_audio.py` where `torch.load()` was called with `weights_only=False`, allowing any pickle-serialized Python object — including malicious code — to execute during checkpoint loading. The fix switches to `weights_only=True` and explicitly allowlists only the two non-standard classes the checkpoint actually requires: `argparse.Namespace` and `pathlib.PosixPath`. This closes a real code execution path tha

critical

How WebSocket protocol length header abuse happens in Node.js and how to fix it

A critical vulnerability (CVE-2026-54466) in websocket-driver versions prior to 0.7.5 allows attackers to corrupt WebSocket messages by manipulating protocol length headers. This can lead to data integrity issues, denial of service, or potentially arbitrary code execution in affected Node.js applications. The fix involves upgrading the websocket-driver dependency to version 0.7.5.