CVE-2026-62985: request-filtering-agent: Synchronous throw from createConnection() for literal private-IP hosts bypasses req.on('error'), crashing the Node.js process

Published Sep 22, 2026
·
Updated

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.

Other sources

request-filtering-agent is an http(s).Agent implementation that blocks requests to Private/Reserved IP addresses. Prior to 3.2.1, RequestFilteringHttpAgent and RequestFilteringHttpsAgent synchronously threw from createConnection when rejecting a literal private-IP host such as 169.254.169.254 or 127.0.0.1. Because Node.js http.request and http.get expect connection failures to be delivered asynchronously, the throw bypassed req.on('error') and became an uncaught exception that could terminate the application process. Hostnames resolved through the asynchronous lookup path were not affected by this error-delivery asymmetry. This issue is fixed in version 3.2.1.

MITRE

Affected Software

2 affected componentsFixes available
npm/request-filtering-agent<3.2.1
npm/request-filtering-agent<3.2.1
3.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/request-filtering-agent to a version that resolves this vulnerability.

    Fixed in 3.2.1
  2. Upgrade

    Upgrade request-filtering-agent to a version that resolves this vulnerability.

    Fixed in 3.2.1

Event History

Sep 22, 2026
CVE Published
via MITRE·07:13 PM
Data Sourced
via MITRE·07:13 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:54 PM
Data Sourced
via GitHub·07:54 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can trigger the process crash?

An unauthenticated remote party can trigger it if they can cause the application to issue a request through a vulnerable RequestFilteringHttpAgent or RequestFilteringHttpsAgent to a literal private or reserved IP address, such as 169.254.169.254 or 127.0.0.1.

2

Are requests to hostnames affected?

No. Hostnames that are resolved through the asynchronous lookup path are not affected by this error-delivery asymmetry; the issue applies to literal private-IP hosts.

3

Does attaching an error handler to the request prevent the crash?

No. The rejection was thrown synchronously from createConnection(), bypassing req.on('error') and potentially becoming an uncaught exception.

4

What version fixes the issue?

Upgrade request-filtering-agent to version 3.2.1 or later. Versions prior to 3.2.1 are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203