GHSA-pc5p-h8pf-mvwp: Https proxy agent Machine-In-The-Middle Vulnerability

MODERATE
CVSS 6.1
CWE-300
Published
Advisory Summary

GHSA-pc5p-h8pf-mvwp is a MODERATE (CVSS 6.1) machine-in-the-middle vulnerability (CWE-300: Channel Accessible by Non-Endpoint) affecting Https proxy agent libraries in the npm ecosystem. The issue involves machine-in-the-middle in https-proxy-agent. Remediation is available by upgrading affected packages to version 2.2.3.

GHSA-pc5p-h8pf-mvwp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pc5p-h8pf-mvwp
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-300: Channel Accessible by Non-Endpoint
Affected Product Https proxy agent
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

Attack Vector Adjacent (AV:A)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-pc5p-h8pf-mvwp

To remediate this vulnerability, upgrade all affected Https proxy 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.

https-proxy-agent fixed: 2.2.3
npm install https-proxy-agent@2.2.3
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 https-proxy-agent

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-pc5p-h8pf-mvwp, inspect your project dependencies using npm:

npm ls https-proxy-agent

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

Note: The npm ls https-proxy-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-300: Channel Accessible by Non-Endpoint, where the product does not adequately verify the identity of actors at both ends of a communication channel, or does not adequately ensure the integrity of the channel, in a way that allows the channel to be accessed or influenced by an actor that is not an endpoint. In Https proxy 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

Versions of `https-proxy-agent` prior to 2.2.3 are vulnerable to Machine-In-The-Middle. The package fails to enforce TLS on the socket if the proxy server responds the to the request with a HTTP status different than 200. This allows an attacker with access to the proxy server to intercept unencrypted communications, which may include sensitive information such as credentials. ## Recommendation Upgrade to version 3.0.0 or 2.2.3.

GHSA-pc5p-h8pf-mvwp Affected Https proxy agent Versions

1 component(s)
Fixed Versions:
2.2.3
Product / Package Ecosystem Affected Versions Fixed Version
https-proxy-agent
npm
< 2.2.3
2.2.3

References

Frequently Asked Questions

What is GHSA-pc5p-h8pf-mvwp?
GHSA-pc5p-h8pf-mvwp is a security vulnerability in Https proxy agent involving Machine-In-The-Middle in https-proxy-agent under CWE-300: Channel Accessible by Non-Endpoint.
Which Https proxy agent versions are affected?
Affected versions include releases prior to 2.2.3 across affected packages: https-proxy-agent.
What version fixes GHSA-pc5p-h8pf-mvwp?
Upgrading to 2.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is https-proxy-agent affected?
Yes, https-proxy-agent is affected in releases prior to 2.2.3. Upgrade your dependency to 2.2.3 or later.
What is the CVSS score of GHSA-pc5p-h8pf-mvwp?
GHSA-pc5p-h8pf-mvwp has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with GHSA-pc5p-h8pf-mvwp?
GHSA-pc5p-h8pf-mvwp is classified under CWE-300: Channel Accessible by Non-Endpoint (The product does not adequately verify the identity of actors at both ends of a communication channel, or does not adequately ensure the integrity of the channel, in a way that allows the channel to be accessed or influenced by an actor that is not an endpoint.).
How can I check npm dependencies for GHSA-pc5p-h8pf-mvwp?
Run the dependency tree command: 'npm ls https-proxy-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-pc5p-h8pf-mvwp",
  "modified" : "2023-11-01T20:54:11Z",
  "published" : "2020-04-16T03:14:56Z",
  "aliases" : [ ],
  "summary" : "Machine-In-The-Middle in https-proxy-agent",
  "details" : "Versions of `https-proxy-agent` prior to 2.2.3 are vulnerable to Machine-In-The-Middle. The package fails to enforce TLS on the socket if the proxy server responds the to the request with a HTTP status different than 200. This allows an attacker with access to the proxy server to intercept unencrypted communications, which may include sensitive information such as credentials.\n\n\n## Recommendation\n\nUpgrade to version 3.0.0 or 2.2.3.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "https-proxy-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/TooTallNate/node-https-proxy-agent/commit/36d8cf509f877fa44f4404fce57ebaf9410fe51b"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/541502"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-HTTPSPROXYAGENT-469131"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1184"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-300" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-04-16T03:03:19Z",
    "nvd_published_at" : null
  }
}