Intel

AIKIDO-2026-11060

distlib is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

39

Low Risk

This Affects:

PYTHONdistlib
0.1.0 - 0.4.0
Fixed in 0.4.1
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

distlib is vulnerable to Path Traversal in versions 0.1.0 - 0.4.0.

How to fix this

Upgrade the distlib library to the patch version.