CVE-2026-62985: Sync Throw In Http Agent Createconnection

Synchronous `throw` of a connection error inside createConnection() of an http(s).Agent subclass. Node calls agent.createConnection() synchronously from the ClientRequest constructor (agent.addRequest -> createSocket -> createConnection) without a try/catch and expects connection failures to be reported asynchronously: by returning a socket that emits 'error

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-62985-sync-throw-in-http-agent-createconnection --engine opengrep

Description

Synchronous `throw` of a connection error inside createConnection() of an http(s).Agent subclass. Node calls agent.createConnection() synchronously from the ClientRequest constructor (agent.addRequest -> createSocket -> createConnection) without a try/catch and expects connection failures to be reported asynchronously: by returning a socket that emits 'error