Skip to main content
EPSS 0.5%top 58%

Gptline: NLTK: Entity-expansion DoS (billion laughs) via remaining raw ElementTree parses (CVE-2026-78681)

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

Description

NLTK versions from 1.0.8 up to but not including 1.0.8_23 contain a denial-of-service vulnerability due to unsafe XML entity expansion in several XML parsing functions that use Python's xml.etree.ElementTree directly. Crafted XML documents with nested entity declarations can cause exponential memory amplification (billion laughs attack), leading to high memory consumption and potential service disruption. The vulnerability is mitigated by routing XML parsing through a new nltk.xmlsec module that forbids entity declarations, using defusedxml or a fallback expat pre-scan. A patch is available to address this issue.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

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, 02:16:52 UTC

Technical Analysis

Several XML parsing sites in NLTK (<= 3.10.2) use xml.etree.ElementTree directly, which processes <!ENTITY> declarations in internal DTD subsets, allowing crafted XML documents to expand exponentially in memory (billion laughs attack). This causes a memory amplification denial-of-service (CWE-776). The vulnerability affects call sites including nltk.chunk.named_entity.load_ace_file, nltk.internals.ElementWrapper, and nltk.downloader XML parsing functions. The underlying libexpat parser added an input-amplification cap in version 2.6.0, but it only activates above ~8 MiB output and depends on the linked libexpat version; older versions have no cap. The fix routes all XML parsing through nltk.xmlsec, which forbids entity declarations and prefers defusedxml, falling back to an expat pre-scan to block malicious entities. The patch rejects malicious payloads that previously caused large memory expansions.

Potential Impact

Exploitation of this vulnerability allows an attacker to cause a denial-of-service by consuming excessive memory through crafted XML documents with nested entity expansions. This can lead to application crashes or degraded service availability. There is no remote code execution or file disclosure as external entities are not resolved. The impact is limited to memory exhaustion and denial-of-service conditions.

Mitigation Recommendations

A patch is available that routes all affected XML parsing through the nltk.xmlsec module, which forbids entity declarations and uses defusedxml or a fallback expat pre-scan to prevent entity expansion attacks. Users should upgrade to the fixed version >=1.0.8_23. No additional action is required if the patch is applied.

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
GHSA-jx89-3qg8-p2mr
Osv Schema Version
1.4.0
Aliases
["CVE-2026-78681"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a8d9aeeacd9273b493e19c1

Added to database: 08/25/2026, 13:38:54 UTC

Last enriched: 09/18/2026, 02:16:52 UTC

Last updated: 10/09/2026, 06:48:19 UTC

Views: 67

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