<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-29T20:38:16.613547+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/brew-acronym-cve-2026-80206</id>
    <title>BREW-acronym-CVE-2026-80206 — NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions</title>
    <updated>2026-09-29T20:38:16.662211+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Homebrew: acronym</p>
<p>### Summary
The NLTK `tgrep` module accepts user-supplied regular expressions and passes them to the Python `re` engine without a timeout or validation, enabling catastrophic backtracking (ReDoS). Applications that expose the `tgrep` API to external input are vulnerable to a single-request denial of service that blocks the Python process indefinitely.</p>
<p>### Affected Code
`nltk/tgrep.py` — `_tgrep_node_action()` (around line 320)</p>
<p>When a tgrep pattern contains a `/regex/` node, `_tgrep_node_action` compiles the embedded regex literal directly with no validation:</p>
<p>```python
def _tgrep_node_action(_s, _l, tokens):
    ...
    elif tokens[0].startswith("/"):
        assert tokens[0].endswith("/")
        node_lit = tokens[0][1:-1]
        return (
            lambda r: lambda n, m=None, l=None: r.search(
                _tgrep_node_literal_value(n)
            )
        )(re.compile(node_lit))  # User regex compiled and executed with no timeout
```
The compiled regex is applied against every matching tree node label via `r.search(...)`. A caller reaching this path via `tgrep_positions()` or `tgrep_compile()` controls `node_lit` entirely.</p>
<p>### Proof of Concept
```python
import nltk
from nltk.tgrep import tgrep_positions</p>
<p># Root node label is 25 'a' characters.
# tgrep /regex/ branch calls re.compile("((a+)+)b").search("aaa...a")
# No 'b' is present — exponential backtracking occurs.
tree = nltk.Tree.fromstring("(" + "a" * 25 + " (NP (DT the)))")
tgrep_positions(r"/((a+)+)b/", [tre…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/brew-acronym-cve-2026-80206"/>
  </entry>
  <entry>
    <id>https://db.gcve.eu/vuln/cve-2026-80206</id>
    <title>CVE-2026-80206 — NLTK 3.10.2 Regular Expression Denial of Service via tgrep</title>
    <updated>2026-09-29T20:38:16.662291+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> nltk</p>
<p>NLTK before 3.10.3 contains a regular expression denial of service (ReDoS) vulnerability in the tgrep module. The _tgrep_node_action function compiles user-supplied regular expressions embedded in /regex/ pattern nodes and executes them via re.search against tree node labels without any validation or timeout. An attacker who controls the tgrep pattern (e.g., via tgrep_positions() or tgrep_compile() exposed to external input) can supply a pattern that triggers catastrophic backtracking, causing indefinite CPU saturation that blocks the Python process.</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/cve-2026-80206"/>
  </entry>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-w3v8-gmh9-3wv7</id>
    <title>GHSA-w3v8-gmh9-3wv7 — NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions</title>
    <updated>2026-09-29T20:38:16.662325+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: nltk</p>
<p>### Summary
The NLTK `tgrep` module accepts user-supplied regular expressions and passes them to the Python `re` engine without a timeout or validation, enabling catastrophic backtracking (ReDoS). Applications that expose the `tgrep` API to external input are vulnerable to a single-request denial of service that blocks the Python process indefinitely.</p>
<p>### Affected Code
`nltk/tgrep.py` — `_tgrep_node_action()` (around line 320)</p>
<p>When a tgrep pattern contains a `/regex/` node, `_tgrep_node_action` compiles the embedded regex literal directly with no validation:</p>
<p>```python
def _tgrep_node_action(_s, _l, tokens):
    ...
    elif tokens[0].startswith("/"):
        assert tokens[0].endswith("/")
        node_lit = tokens[0][1:-1]
        return (
            lambda r: lambda n, m=None, l=None: r.search(
                _tgrep_node_literal_value(n)
            )
        )(re.compile(node_lit))  # User regex compiled and executed with no timeout
```
The compiled regex is applied against every matching tree node label via `r.search(...)`. A caller reaching this path via `tgrep_positions()` or `tgrep_compile()` controls `node_lit` entirely.</p>
<p>### Proof of Concept
```python
import nltk
from nltk.tgrep import tgrep_positions</p>
<p># Root node label is 25 'a' characters.
# tgrep /regex/ branch calls re.compile("((a+)+)b").search("aaa...a")
# No 'b' is present — exponential backtracking occurs.
tree = nltk.Tree.fromstring("(" + "a" * 25 + " (NP (DT the)))")
tgrep_positions(r"/((a+)+)b/", [tre…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-w3v8-gmh9-3wv7"/>
  </entry>
</feed>
