pip is vulnerable to Server-Side Request Forgery (SSRF)
59
Medium Risk
pip resolves a package path from a pylock.toml lock file by URL-joining it to the lock file's own location, but does not confirm the result stays on the lock file's scheme and host. When the lock file is fetched from a URL, a path that carries its own URL scheme or authority (for example a file: target or another host) is not seen as absolute, so the join adopts that scheme and host and discards the lock file's base. This lets an externally supplied lock file redirect pip to a local file:// resource or a different remote host, enabling server-side request forgery and access to local filesystem paths. The fix rejects a resolved package path whose scheme or host differs from the URL-fetched lock file's own.
You are affected if you are using a version that falls within the vulnerable range and you install requirements from a pylock.toml lock file fetched from a URL.
pip is vulnerable to Server-Side Request Forgery (SSRF) in versions 26.1.0 - 26.1.2.
Upgrade the pip library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant