Intel

AIKIDO-2026-240948

pip is vulnerable to Server-Side Request Forgery (SSRF)

Server-Side Request Forgery (SSRF) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 2 days ago

59

Medium Risk

This Affects:

PYTHONpip
26.1.0 - 26.1.2
Fixed in 26.2.0
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

pip is vulnerable to Server-Side Request Forgery (SSRF) in versions 26.1.0 - 26.1.2.

How to fix this

Upgrade the pip library to the patch version.