Intel

AIKIDO-2026-777134

platformdirs is vulnerable to Path Traversal

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Sep 23, 2026
September 23, 2026

59

CVE Score

Medium

Path Traversal

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.

How do I fix this?

Upgrade the platformdirs library to the patch version.

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.

Versions

1.4.4 - 4.11.10

Fixed in 4.11.11

Background info

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

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea