Machine-In-The-Middle Vulnerability in https-proxy-agent
Summary
GHSA-pc5p-h8pf-mvwp: Machine-In-The-Middle in https-proxy-agent. Affects https-proxy-agent versions < 2.2.3. Fixed in 2.2.3. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
https-proxy-agent is an npm package that provides a proxy agent for HTTPS requests. It allows users to make HTTP requests via a proxy server. The package is commonly used in Node.js applications to handle proxy configurations. However, versions prior to 2.2.3 are vulnerable to a Machine-In-The-Middle attack.
Vulnerability Detail
The vulnerability in https-proxy-agent arises from its failure to enforce TLS on the socket if the proxy server responds to the request with an HTTP status different than 200. This means that if an attacker has access to the proxy server, they can intercept unencrypted communications, potentially gaining access to sensitive information such as credentials. The impact of this vulnerability can be significant, as it compromises the security of the communication channel between the client and the target server.
How To Fix
Latest published version: 9.1.0 as of 22 Oct 2026
npm install https-proxy-agent@9.1.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.2.3
This is the first release that contains the fix.
npm install https-proxy-agent@2.2.3
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, upgrading to a secure version of the package is the recommended solution.
Conclusion
The Machine-In-The-Middle vulnerability in https-proxy-agent exposes unencrypted communications to potential interception by attackers with access to the proxy server. To mitigate this risk, it is crucial to upgrade to a secure version of the package, such as version 3.0.0 or 2.2.3. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for https-proxy-agent →
FAQ
The vulnerability allows an attacker with access to the proxy server to intercept unencrypted communications, potentially gaining access to sensitive information such as credentials.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the package-lock.json file.
The CVSS score of this vulnerability is 6.1, indicating a moderate severity level.
No, only versions prior to 2.2.3 are affected. Upgrading to version 3.0.0 or 2.2.3 fixes the vulnerability.
There is no specific workaround mentioned for this vulnerability. Upgrading to a secure version of the package is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for https-proxy-agent.