PYSEC-2019-36
NLTK Downloader before 3.4.5 is vulnerable to a directory traversal, allowing attackers to write arbitrary files via a ../ (dot dot slash) in an NLTK package…
Not rated yet
Withdrawn Mar 14, 2023
PyPI
- Severity
- Not rated yet
- No source has published a CVSS score yet
- Exploit chance (EPSS)
- —
- No score published
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- —
- Not classified
- Fix
3.4.5- Upgrade nltk to this version or later
Description
NLTK Downloader before 3.4.5 is vulnerable to a directory traversal, allowing attackers to write arbitrary files via a ../ (dot dot slash) in an NLTK package (ZIP archive) that is mishandled during extraction.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| nltk | < 3.4.5 |
3.4.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
nltk PyPI → 3.4.5
- pip
pip install --upgrade "nltk>=3.4.5"- poetry
poetry add "nltk>=3.4.5"- uv
uv add "nltk>=3.4.5"
References
Other links
- github.com/nltk/nltk/commit/f59d7ed8df2e0e957f7f247fe218032abdbe9a10
- salvatoresecurity.com/zip-slip-in-nltk-cve-2019-14751
- github.com/nltk/nltk/blob/3.4.5/ChangeLog
- github.com/mssalvatore/CVE-2019-14751_PoC
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGZSS…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QI4IJ…
- lists.opensuse.org/opensuse-security-announce/2020-03/msg00054.html
- lists.opensuse.org/opensuse-security-announce/2020-04/msg00001.html
Timeline
- Published
- Last updated by the source
- Withdrawn
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-j456-xh4h-cpf2 NLTK: WekaClassifier passes an unvalidated caller-controlled model path to the weka JVM, bypassing nltk.pathsec containment | High | Also affects nltk |
| GHSA-ff5c-cp5c-9wjf NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars | Medium | Also affects nltk |
| GHSA-f794-5jv7-7672 NLTK: Downloader.download follows hardlinks and overwrites outside-root files | High | Also affects nltk |
| GHSA-8mgp-746c-j5xp NLTK: Model-artifact APIs bypass pathsec and touch files outside allowed roots | High | Also affects nltk |
| GHSA-8mpw-7fpc-4gqj NLTK: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks | Low | Also affects nltk |
| GHSA-cw6x-m8jw-qmrh NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input | Medium | Also affects nltk |
| GHSA-vp2x-qp44-57v7 NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()` | Low | Also affects nltk |
| GHSA-ww6m-cw3f-q94g NLTK: Quadratic-time DoS in PorterStemmer via long runs of 'y' | High | Also affects nltk |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor