GHSA-pc5p-h8pf-mvwp: Https proxy agent Machine-In-The-Middle Vulnerability
MODERATEGHSA-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
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).
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.
npm install https-proxy-agent@2.2.3
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
GHSA-pc5p-h8pf-mvwp Affected Https proxy agent Versions
1 component(s)| 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?
Which Https proxy agent versions are affected?
What version fixes GHSA-pc5p-h8pf-mvwp?
Is https-proxy-agent affected?
What is the CVSS score of GHSA-pc5p-h8pf-mvwp?
What CWE is associated with GHSA-pc5p-h8pf-mvwp?
How can I check npm dependencies for GHSA-pc5p-h8pf-mvwp?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}