Vulnerabilities in pkg:npm/request-filtering-agent

PACKAGE
Advisory Identifier: GHSA-r3r9-wp5j-pq5g
Advisory Summary

CVE-2026-62985 is a HIGH (CVSS 7.5) synchronous throw from createconnection() for vulnerability (CWE-248: Uncaught Exception) affecting request-filtering-agent libraries in the npm ecosystem. The issue involves synchronous throw from createconnection() for literal private-ip hosts bypasses req.on('error'), crashing the node.js process. Remediation is available by upgrading affected packages to version 3.2.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/request-filtering-agent

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/request-filtering-agent. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-r3r9-wp5j-pq5g CVE-2026-62985 HIGH request-filtering-agent: Synchronous throw from createConnection() for literal private-IP hosts bypasses req.on('error'), crashing the Node.js process
GHSA-pw25-c82r-75mm CVE-2025-57814 MODERATE request-filtering-agent SSRF Bypass via HTTPS Requests to 127.0.0.1

CVE-2026-62985 at a Glance

CVE Identifier CVE-2026-62985
GHSA Identifier GHSA-r3r9-wp5j-pq5g
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-248: Uncaught Exception
Affected Product request-filtering-agent
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-62985

To remediate this vulnerability, upgrade all affected request-filtering-agent dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

request-filtering-agent fixed: 3.2.1
npm install request-filtering-agent@3.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls request-filtering-agent

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-62985, inspect your project dependencies using npm:

npm ls request-filtering-agent

Analyze the terminal output to locate any version of request-filtering-agent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.1), your application is affected.

Note: The npm ls request-filtering-agent command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In request-filtering-agent, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `RequestFilteringHttpAgent` / `RequestFilteringHttpsAgent` block requests to private IPs, but the blocking happens via a **synchronous `throw`** inside `createConnection()` for literal private-IP hostnames (e.g. `169.254.169.254`, `127.0.0.1`). Node.js's `http.request` / `http.get` expects `createConnection` to emit an error asynchronously; a synchronous throw instead escapes the caller's `req.on('error', ...)` handler entirely and becomes an **unhandled exception** that crashes the process. ### Affected `request-filtering-agent` <= 3.2.0 (latest). ### PoC (replicated live on 3.2.0) ```js const http = require('http'); const { RequestFilteringHttpAgent } = require('request-filtering-agent'); const agent = new RequestFilteringHttpAgent(); process.on('uncaughtException', e => { console.log('CRASH:', e.message); // fires — process dies }); const req = http.get({ hostname: '169.254.169.254', port: 80, agent }); req.on('error', e => { /* never reached for literal IPs */ }); ``` Actual output: ``` request-filtering-agent@3.2.0 synchronous throw escaping error event: UNCAUGHT EXCEPTION (process crash): DNS lookup 169.254.169.254(...) is not allowed. Because, It is private IP address. *** CRASH CONFIRMED: createConnection throws sync, bypasses req.on("error") *** ``` Note: hostnames that resolve to private IPs (e.g. `localhost`) are handled via the async lookup path and correctly emit an error event — this asymmetry confirms the sync-throw is a defect. ### Impact Any application using `request-filtering-agent` where an attacker can trigger an HTTP request to a literal private-IP (e.g. from a user-supplied URL that is pre-validated but still reaches `http.get`) will crash the Node.js process — full DoS. ### Fix Instead of throwing synchronously in `createConnection()`, call `callback(error)` (the Node.js `net.createConnection` error-callback convention) or use `process.nextTick(() => socket.destroy(error))` on the returned socket to emit the error asynchronously, allowing `req.on('error')` to handle it.

CVE-2026-62985 Affected request-filtering-agent Versions

1 component(s)
Fixed Versions:
3.2.1
Product / Package Ecosystem Affected Versions Fixed Version
request-filtering-agent
npm
< 3.2.1
3.2.1

References

Frequently Asked Questions

What is CVE-2026-62985?
CVE-2026-62985 is a security vulnerability in request-filtering-agent involving Synchronous throw from createConnection() for literal private-IP hosts bypasses req.on('error'), crashing the Node.js process under CWE-248: Uncaught Exception.
Which request-filtering-agent versions are affected?
Affected versions include releases prior to 3.2.1 across affected packages: request-filtering-agent.
What version fixes CVE-2026-62985?
Upgrading to 3.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is request-filtering-agent affected?
Yes, request-filtering-agent is affected in releases prior to 3.2.1. Upgrade your dependency to 3.2.1 or later.
What is the CVSS score of CVE-2026-62985?
CVE-2026-62985 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-62985?
CVE-2026-62985 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check npm dependencies for CVE-2026-62985?
Run the dependency tree command: 'npm ls request-filtering-agent'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r3r9-wp5j-pq5g",
  "modified" : "2026-09-22T19:54:18Z",
  "published" : "2026-09-22T19:54:18Z",
  "aliases" : [ "CVE-2026-62985" ],
  "summary" : "request-filtering-agent: Synchronous throw from createConnection() for literal private-IP hosts bypasses req.on('error'), crashing the Node.js process",
  "details" : "### Summary\n`RequestFilteringHttpAgent` / `RequestFilteringHttpsAgent` block requests to private IPs, but the blocking happens via a **synchronous `throw`** inside `createConnection()` for literal private-IP hostnames (e.g. `169.254.169.254`, `127.0.0.1`). Node.js's `http.request` / `http.get` expects `createConnection` to emit an error asynchronously; a synchronous throw instead escapes the caller's `req.on('error', ...)` handler entirely and becomes an **unhandled exception** that crashes the process.\n\n### Affected\n`request-filtering-agent` <= 3.2.0 (latest).\n\n### PoC (replicated live on 3.2.0)\n```js\nconst http = require('http');\nconst { RequestFilteringHttpAgent } = require('request-filtering-agent');\nconst agent = new RequestFilteringHttpAgent();\nprocess.on('uncaughtException', e => {\n  console.log('CRASH:', e.message); // fires — process dies\n});\nconst req = http.get({ hostname: '169.254.169.254', port: 80, agent });\nreq.on('error', e => { /* never reached for literal IPs */ });\n```\nActual output:\n```\nrequest-filtering-agent@3.2.0 synchronous throw escaping error event:\nUNCAUGHT EXCEPTION (process crash): DNS lookup 169.254.169.254(...) is not allowed. Because, It is private IP address.\n*** CRASH CONFIRMED: createConnection throws sync, bypasses req.on(\"error\") ***\n```\nNote: hostnames that resolve to private IPs (e.g. `localhost`) are handled via the async lookup path and correctly emit an error event — this asymmetry confirms the sync-throw is a defect.\n\n### Impact\nAny application using `request-filtering-agent` where an attacker can trigger an HTTP request to a literal private-IP (e.g. from a user-supplied URL that is pre-validated but still reaches `http.get`) will crash the Node.js process — full DoS.\n\n### Fix\nInstead of throwing synchronously in `createConnection()`, call `callback(error)` (the Node.js `net.createConnection` error-callback convention) or use `process.nextTick(() => socket.destroy(error))` on the returned socket to emit the error asynchronously, allowing `req.on('error')` to handle it.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "request-filtering-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/azu/request-filtering-agent/security/advisories/GHSA-r3r9-wp5j-pq5g"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/azu/request-filtering-agent/commit/9d12561064524807fc399158eaa5bd7a40dd8cd0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/azu/request-filtering-agent"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/azu/request-filtering-agent/releases/tag/v3.2.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-248" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-22T19:54:18Z",
    "nvd_published_at" : null
  }
}