platformdirs is vulnerable to Path Traversal
59
Medium Risk
PlatformDirs joins the appname, appauthor, and version constructor arguments into the platform base directory through _join_app_name_and_version, which relies on os.path.join. A value containing a .. segment, a leading separator, a drive letter, or a UNC share makes os.path.join discard the base directory and resolve outside the intended platform root, and ensure_exists can then create directories at that escaped location. Before the fix, PlatformDirs accepted these values without validation. The fix rejects appname, appauthor, and version values that would escape the base directory with a ValueError in the constructor.
You are affected if you are using a version that falls within the vulnerable range and you pass an untrusted value as the appname, appauthor, or version argument to PlatformDirs.
platformdirs is vulnerable to Path Traversal in versions 1.4.4 - 4.11.10.
Upgrade the platformdirs 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.