Gptline: NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input (CVE-2026-81724)
A denial of service vulnerability exists in the NLTK library's FeatStructReader parser due to uncontrolled recursion when processing deeply nested feature-structure strings. The parser lacks a maximum recursion depth limit, causing Python's RecursionError to be raised and crash applications that parse untrusted input. This affects NLP tools and pipelines using FeatStruct or FeatureGrammar.fromstring(). The issue is not related to memory safety or code execution but results in application crashes. A patch is available to address this issue.
AI Analysis
Technical Summary
The NLTK library's nltk.featstruct.FeatStructReader uses a recursive-descent parser to parse feature-structure strings without enforcing a maximum nesting depth. Deeply nested inputs cause the parser to exceed Python's recursion limit, raising an unhandled RecursionError instead of the library's usual catchable exceptions. This uncontrolled recursion leads to denial of service by crashing applications that parse user-supplied feature-structure or grammar text. Similar protections exist in other parts of NLTK (e.g., LogicParser and JSONTaggedDecoder) but are missing in FeatStructReader. The vulnerability affects both direct use of FeatStruct and grammar parsing via FeatureGrammar.fromstring(). A proof of concept demonstrates crashing the parser with a small (~700 bytes) crafted input at nesting depth 167.
Potential Impact
Applications using NLTK's FeatStructReader to parse feature-structure or grammar strings can be crashed by unauthenticated attackers supplying deeply nested input. This results in denial of service due to an unhandled RecursionError. There is no impact on confidentiality or integrity, and no code execution or memory corruption is involved.
Mitigation Recommendations
A patch is available to address this vulnerability by adding recursion depth limits similar to other NLTK parsers. Users should apply the official fix to prevent unhandled RecursionError crashes. Until patched, avoid parsing untrusted or deeply nested feature-structure inputs. No additional mitigations are required beyond applying the patch.
Gptline: NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input (CVE-2026-81724)
Description
A denial of service vulnerability exists in the NLTK library's FeatStructReader parser due to uncontrolled recursion when processing deeply nested feature-structure strings. The parser lacks a maximum recursion depth limit, causing Python's RecursionError to be raised and crash applications that parse untrusted input. This affects NLP tools and pipelines using FeatStruct or FeatureGrammar.fromstring(). The issue is not related to memory safety or code execution but results in application crashes. A patch is available to address this issue.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The NLTK library's nltk.featstruct.FeatStructReader uses a recursive-descent parser to parse feature-structure strings without enforcing a maximum nesting depth. Deeply nested inputs cause the parser to exceed Python's recursion limit, raising an unhandled RecursionError instead of the library's usual catchable exceptions. This uncontrolled recursion leads to denial of service by crashing applications that parse user-supplied feature-structure or grammar text. Similar protections exist in other parts of NLTK (e.g., LogicParser and JSONTaggedDecoder) but are missing in FeatStructReader. The vulnerability affects both direct use of FeatStruct and grammar parsing via FeatureGrammar.fromstring(). A proof of concept demonstrates crashing the parser with a small (~700 bytes) crafted input at nesting depth 167.
Potential Impact
Applications using NLTK's FeatStructReader to parse feature-structure or grammar strings can be crashed by unauthenticated attackers supplying deeply nested input. This results in denial of service due to an unhandled RecursionError. There is no impact on confidentiality or integrity, and no code execution or memory corruption is involved.
Mitigation Recommendations
A patch is available to address this vulnerability by adding recursion depth limits similar to other NLTK parsers. Users should apply the official fix to prevent unhandled RecursionError crashes. Until patched, avoid parsing untrusted or deeply nested feature-structure inputs. No additional mitigations are required beyond applying the patch.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-gptline-CVE-2026-81724
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6aac8e5955bf5e2cf5491aec
Added to database: 09/18/2026, 01:05:29 UTC
Last enriched: 09/18/2026, 01:51:00 UTC
Last updated: 09/18/2026, 02:07:18 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.