python-discovery is vulnerable to Uncontrolled Search Path Element
69
Medium Risk
python-discovery's get_paths() turns every PATH entry into a Path without filtering empty components. A leading, trailing, or doubled path separator produces an empty entry that resolves to the current working directory, so discovery's interrogation step searches and executes whatever binary sits there. An attacker who can write a file such as python3.11 into that directory gets it executed as a candidate interpreter, whether or not discovery ultimately selects it as the result. The fix filters out empty PATH components before they become search candidates.
You are affected if you are using a version that falls within the vulnerable range and your PATH environment variable contains an empty entry while discovery runs from a directory that untrusted content can write to.
python-discovery is vulnerable to Uncontrolled Search Path Element in versions 0.0.1 - 1.6.0.
Upgrade the python-discovery 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
ISO 42001Compliant© All Intel data is openly available and commercially licensed.