CVE-2026-129228: NLTK: Uncontrolled recursion in Toolbox settings helpers causes denial of service via deeply nested input
Published 2026-11-19 · Updated 2026-11-20 · Also known as GHSA-f2h2-f4fc-p978
Summary
NLTK contains uncontrolled recursion vulnerabilities in its Toolbox settings helpers, allowing unauthenticated attackers to cause a denial of service via deeply nested input. Users of the affected NLTK versions should monitor for the upcoming patch release that includes the recursion depth bounding.
Who is affected
Applications that parse and subsequently process or serialize untrusted Toolbox settings files are vulnerable. When an attacker provides a sufficiently deep settings tree, the lack of recursion limits causes a Python RecursionError, which terminates the affected operation or request worker, leading to denial of service.
Exploitability
The vulnerability is rated as Medium severity with a CVSS 3.1 base score of 5.3, indicating it is remotely exploitable with low attack complexity and no privileges required. There is no active exploitation reported via CISA KEV, and EPSS data is not yet available.
Remediation
- Upgrade to NLTK version 3.10.4 once it becomes available.
- Implement an application-level check on the depth of input settings trees prior to passing them to NLTK Toolbox helper functions.
- Monitor the NLTK repository for the official release containing commit e521ecafc.
How to check your project
- Check the project's dependency manifest (e.g., requirements.txt, pyproject.toml) to confirm if an nltk version prior to 3.10.4 is in use.
- Verify the installed package version using 'pip show nltk' in the project environment.
Automated analysis of the published advisory data, generated 2026-11-20. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | nltk |
>= 0, < 3.10.4 | 3.10.4 | python -m pip install 'nltk>=3.10.4' |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | Low |
FAQ
Does this vulnerability allow for arbitrary code execution?
No. The vulnerability is limited to a Python RecursionError, which results in a denial of service rather than memory corruption or code execution.
Is there a patch available for immediate installation?
The fix is merged into the develop branch (commit e521ecafc), but it has not yet been included in a formal release tag. Version 3.10.4 is identified as the fixed version.
What specifically triggers the denial of service?
The vulnerability is triggered when a deeply nested element tree (built from attacker-supplied input) is passed to one of the public helper functions, such as to_settings_string, remove_blanks, add_default_fields, sort_fields, or add_blank_lines.
Original advisory description
References
- WEB https://github.com/nltk/nltk/security/advisories/GHSA-f2h2-f4fc-p978
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-129228
- WEB https://github.com/nltk/nltk/pull/3885
- WEB https://github.com/nltk/nltk/commit/0b6975377d0334af604d32c9d83b26b46e1d437c
- PACKAGE https://github.com/nltk/nltk
- WEB https://github.com/nltk/nltk/releases/tag/v3.10.4
Source records: GHSA-f2h2-f4fc-p978 (OSV.dev) · EPSS by FIRST, 2026-11-21.