GHSA-5gh2-94qg-qppq is a high-severity (CVSS 8.8) Deserialization of Untrusted Data vulnerability in nltk. A fix is available for nltk — see the affected versions and patch details below.
NLTK AllowlistUnpickler dotted-name validation bypass allows remote code execution
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5gh2-94qg-qppq.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-5gh2-94qg-qppq by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 382,795 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
nltkReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
NLTK before 3.10.3 contains a remote code execution vulnerability in AllowlistUnpickler that validates only the pickle module string and not the global name, allowing attackers to resolve dotted names by attribute traversal to callables outside the allowlisted namespace. Attackers can craft untrusted transition-parser models that execute arbitrary commands when TransitionParser.parse loads the model through allowlisted_pickle_load.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | nltk | ≥ 3.10.0&&< 3.10.3 | 3.10.3pip install --upgrade 'nltk==3.10.3' |
Affected Products
nltknltkDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nltk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update nltk to 3.10.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5gh2-94qg-qppq is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This is an Important vulnerability as it allows for remote code execution when processing untrusted NLTK transition-parser models. This can lead to arbitrary command execution and full system compromise in affected Red Hat products, including OpenShift Lightspeed and Lightspeed Core, which may process external data…
To mitigate this issue, avoid loading NLTK transition-parser models from untrusted or unverified sources. Ensure that applications processing such models implement robust input validation and only load models from known, secure origins.Source: Red Hat security advisory for GHSA-5gh2-94qg-qppq (CC BY 4.0)
Frequently Asked Questions
Is GHSA-5gh2-94qg-qppq in your dependencies?
Find it across PyPI, including transitive dependencies.