platformdirs is vulnerable to Path Traversal
59
CVE Score
Medium
Path Traversal
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.
Upgrade the platformdirs library to the patch version.
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.
1.4.4 - 4.11.10
Fixed in 4.11.11platformdirs is vulnerable to Path Traversal in versions 1.4.4 - 4.11.10.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
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.