Intel

AIKIDO-2026-777134

platformdirs is vulnerable to Path Traversal

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

59

Medium Risk

This Affects:

PYTHONplatformdirs
1.4.4 - 4.11.10
Fixed in 4.11.11
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

platformdirs is vulnerable to Path Traversal in versions 1.4.4 - 4.11.10.

How to fix this

Upgrade the platformdirs library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform