Skip to main content

Gptline: NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input (CVE-2026-81724)

0
Medium
Published: 09/02/2026 (09/02/2026, 09:04:32 UTC)
Source: GCVE Database
Product: gptline

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected software

Homebrewmore threats →ghsa
gptline
pkg:brew/gptline
Affected versions
>=1.0.8 <1.0.8_23

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

AILast updated: 09/18/2026, 01:51:00 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses