distlib is vulnerable to Path Traversal
39
Low Risk
The ScriptMaker class in distlib.scripts constructs the output path for generated script wrappers by joining the target scripts directory with the entry point name and writing the result without verifying it stays inside the target directory. A package whose entry point metadata contains crafted names with parent-directory segments can cause an installer that uses distlib to write the wrapper outside the intended scripts directory, overwriting arbitrary files with the installing user's privileges. Version 0.4.1 resolves the candidate path to an absolute path and raises DistlibException when it falls outside the target directory.
You are affected if you are using a version that falls within the vulnerable range.
distlib is vulnerable to Path Traversal in versions 0.1.0 - 0.4.0.
Upgrade the distlib 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.

SOC 2Compliant
ISO 27001Compliant