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

high

How a writable root filesystem service vulnerability happens in Docker Compose and how to fix it

The `opensearch` service defined in `Docker/LocalCluster.s3.yaml` was running with a fully writable root filesystem, giving any process inside the container the ability to modify binaries, drop payloads, or persist malicious changes. The fix pins the container to a read-only root filesystem with `read_only: true`, closing off a common post-compromise persistence and tampering vector while preserving normal OpenSearch operation.

high

How Denial of Service via ZIP Bomb happens in Node.js and how to fix it

CVE-2026-39244 is a high-severity denial of service vulnerability in adm-zip 0.5.18 that allows attackers to crash Node.js applications through malicious ZIP files. The fix upgrades the dependency to 0.6.0 and uses npm overrides to eliminate the vulnerable version from the entire dependency tree.

critical

How Authentication Bypass Happens in Node.js WebSocket Services and How to Fix It

The HousePanel push notification service exposed GET and POST endpoints without any authentication checks, allowing unauthenticated attackers to send arbitrary push notifications to connected smart devices. This critical vulnerability was fixed by implementing mandatory token validation on all protected endpoints, ensuring only authenticated requests can trigger push operations.

high

How Denial of Service via crafted long-path tar archive happens in Node.js and how to fix it

CVE-2026-73566 is a high-severity Denial of Service vulnerability in node-tar versions before 7.5.21, where specially crafted archives with extremely long path names can cause infinite loops during extraction. The fix upgrades the tar dependency from 7.5.19 to 7.5.21, which adds proper bounds checking and prevents CPU exhaustion attacks.

high

How Quadratic CPU Consumption happens in js-yaml and how to fix it

A high-severity denial-of-service flaw in js-yaml's `!!omap` type resolution (GHSA-5p4m-2wfm-xmqj / CVE-2026-59870) let specially crafted YAML documents trigger quadratic CPU consumption. The fix upgrades js-yaml from 4.1.1 to 4.3.1 (and pins 3.x users to 3.15.1) via a `package.json` override, closing off an unpatched backport gap before it could be chained into a larger attack.

high

How Missing Rate Limiting Leads to Denial of Service in Express.js and How to Fix It

A high-severity denial of service vulnerability in `src/index.js` allowed attackers to exhaust server resources through unlimited requests to `/api/register` and `/api/captcha`. The fix implements in-memory rate limiting middleware, restricting captcha generation to 20 requests per minute and registration to 10 requests per minute per IP.