CVE-2018-3739: https-proxy-agent denial of service via unsanitized proxy options

CVE-2018-3739 · Severity: low · CVSS 3 · Published 2018-07-27

https-proxy-agent is a Node.js library used to establish HTTPS connections through a proxy server. Versions before 2.2.0 are vulnerable to denial of service attacks due to improper handling of the proxy.auth parameter, which can be exploited by an attacker to crash the application or consume excessive resources.

Technologies: https-proxy-agent (npm). Vendors: npm.

Quick answers

Is CVE-2018-3739 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2018-3739 being exploited in the wild.
How severe is CVE-2018-3739?
Low severity, with a CVSS score of 3, published 27 July 2018.
Which products and versions are affected?
https-proxy-agent (npm) SEMVER:introduced=0,fixed=2.2.0.
Is there a fix for CVE-2018-3739?
Yes. https-proxy-agent (npm): upgrade to 2.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2018-3739 attacked?
It is attacked over the network.
Am I affected by CVE-2018-3739?
Check whether you run https-proxy-agent (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • https-proxy-agent (npm): upgrade to 2.2.0 or later
    npm install https-proxy-agent@2.2.0

Technical details

The vulnerability exists in https-proxy-agent versions prior to 2.2.0 due to unsafe use of the deprecated Buffer constructor. The proxy.auth parameter is passed directly to new Buffer() without sanitization, triggering out-of-bounds read/write behavior (CWE-125, CWE-400). An attacker can supply crafted proxy authentication credentials to trigger a denial of service condition. This is a network-accessible vulnerability requiring no authentication or user interaction. The fix involves replacing new Buffer(proxy.auth) with the safe Buffer.from(proxy.auth) constructor, which properly validates input.

Affected products

  • TooTallNate https-proxy-agent < 2.2.0

Identifiers

  • CVE-2018-3739
  • GHSA-8g7p-74h8-hg48

Timeline

  • 2018-07-27: disclosed
  • 2018-07-27: patched: Version 2.2.0 released with Buffer.from() fix

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.