<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Tue, 29 Sep 2026 17:15:43 +0000</lastBuildDate>
    <item>
      <title>BREW-acronym-CVE-2026-80206 — NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions</title>
      <link>https://db.gcve.eu/vuln/brew-acronym-cve-2026-80206</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Homebrew: acronym&lt;/p&gt;
&lt;p&gt;### 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.&lt;/p&gt;
&lt;p&gt;### Affected Code
`nltk/tgrep.py` — `_tgrep_node_action()` (around line 320)&lt;/p&gt;
&lt;p&gt;When a tgrep pattern contains a `/regex/` node, `_tgrep_node_action` compiles the embedded regex literal directly with no validation:&lt;/p&gt;
&lt;p&gt;```python
def _tgrep_node_action(_s, _l, tokens):
    ...
    elif tokens[0].startswith(&amp;#34;/&amp;#34;):
        assert tokens[0].endswith(&amp;#34;/&amp;#34;)
        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.&lt;/p&gt;
&lt;p&gt;### Proof of Concept
```python
import nltk
from nltk.tgrep import tgrep_positions&lt;/p&gt;
&lt;p&gt;# Root node label is 25 &amp;#39;a&amp;#39; characters.
# tgrep /regex/ branch calls re.compile(&amp;#34;((a+)+)b&amp;#34;).search(&amp;#34;aaa...a&amp;#34;)
# No &amp;#39;b&amp;#39; is present — exponential backtracking occurs.
tree = nltk.Tree.fromstring(&amp;#34;(&amp;#34; + &amp;#34;a&amp;#34; * 25 + &amp;#34; (NP (DT the)))&amp;#34;)
tgrep_positions(r&amp;#34;/((a+)+)b/&amp;#34;, [tre…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Homebrew: acronym&lt;/p&gt;
&lt;p&gt;### 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.&lt;/p&gt;
&lt;p&gt;### Affected Code
`nltk/tgrep.py` — `_tgrep_node_action()` (around line 320)&lt;/p&gt;
&lt;p&gt;When a tgrep pattern contains a `/regex/` node, `_tgrep_node_action` compiles the embedded regex literal directly with no validation:&lt;/p&gt;
&lt;p&gt;```python
def _tgrep_node_action(_s, _l, tokens):
    ...
    elif tokens[0].startswith(&amp;#34;/&amp;#34;):
        assert tokens[0].endswith(&amp;#34;/&amp;#34;)
        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.&lt;/p&gt;
&lt;p&gt;### Proof of Concept
```python
import nltk
from nltk.tgrep import tgrep_positions&lt;/p&gt;
&lt;p&gt;# Root node label is 25 &amp;#39;a&amp;#39; characters.
# tgrep /regex/ branch calls re.compile(&amp;#34;((a+)+)b&amp;#34;).search(&amp;#34;aaa...a&amp;#34;)
# No &amp;#39;b&amp;#39; is present — exponential backtracking occurs.
tree = nltk.Tree.fromstring(&amp;#34;(&amp;#34; + &amp;#34;a&amp;#34; * 25 + &amp;#34; (NP (DT the)))&amp;#34;)
tgrep_positions(r&amp;#34;/((a+)+)b/&amp;#34;, [tre…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/brew-acronym-cve-2026-80206</guid>
    </item>
    <item>
      <title>CVE-2026-80206 — NLTK 3.10.2 Regular Expression Denial of Service via tgrep</title>
      <link>https://db.gcve.eu/vuln/cve-2026-80206</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; nltk&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; nltk&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/cve-2026-80206</guid>
    </item>
    <item>
      <title>PYSEC-2026-3751</title>
      <link>https://db.gcve.eu/vuln/pysec-2026-3751</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: nltk&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: nltk&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/pysec-2026-3751</guid>
    </item>
  </channel>
</rss>
