Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. nltk
  4. ›
  5. CVE-2026-12243

CVE-2026-12243: nltk: Arbitrary File Read via Path Traversal in nltk.data.load() through Percent-Encoded Sequences

August 13, 2026

nltk.data.load() and nltk.data.find() resolve user-supplied resource names to filesystem paths using url2pathname(), which decodes percent-encoded sequences (e.g. %2e%2e to ..). Path safety checks are performed on the raw, still-encoded string before decoding occurs. An attacker supplying %2e%2e instead of .. bypasses all path validation and reads arbitrary files outside the NLTK data directory.

References

  • github.com/advisories/GHSA-m42h-3232-vpv3
  • github.com/nltk/nltk/commit/aec4fce1b84ad725b8975f7365b23a4f626572a9
  • github.com/nltk/nltk/issues/3504
  • github.com/nltk/nltk/pull/3522
  • github.com/nltk/nltk/security/advisories/GHSA-m42h-3232-vpv3
  • github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-597.yaml
  • huntr.com/bounties/39aa9354-54ca-4e77-96da-580eb1fe6ed1
  • nvd.nist.gov/vuln/detail/CVE-2026-12243
  • securityinfinity.com/research/path-traversal-in-nltks-nltk-data-load-via-percent-encoded-sequences

Code Behaviors & Features

Detect and mitigate CVE-2026-12243 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.10.0

Fixed versions

  • 3.10.0

Solution

Upgrade to version 3.10.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/nltk/CVE-2026-12243.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 14 Aug 2026 12:19:55 +0000.