Skip to content
Heist/ feed
Back to feed
HighFix available

nltk — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-72818

The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.

Products
nltk
Affected versions
3.10.0-1, 3.10.1-1, 3.10.3-1, 3.8-1, 3.8.1-1, 3.9.1-1, 3.9.1-2, 3.9.2-1, 3.9.3-1
Fixed versions
3.10.3-1
CVEs
CVE-2026-72818
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:45 UTC · Revision 2

Source evidence

DEBIAN-CVE-2026-72818

core-osv · Original source

Published 20 Aug 2026, 22:18 UTC

The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.

osv:DEBIAN-CVE-2026-72818

nltk

Fixed versions: Not specified

nltk

Fixed versions: Not specified

nltk

Fixed versions: 3.10.3-1

Complete source record
{
  "id": "05a5068c7f4fbffad92f56a3022c1b8a5f2f0205c366d98746673212df1f45b2",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-72818",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-72818",
    "summary": "The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\\-][a-z0-9]+)* is unbounded. Input consisting of many alternating label separators can be partitioned in exponentially many ways, and because the branch also requires a trailing top-level domain that such input never supplies, the engine explores those partitions before failing at each offset. A few kilobytes of input therefore consumes seconds to minutes of single-threaded CPU, and the HANG_RE substitution performed before matching does not collapse the pattern. TweetTokenizer is intended for tokenizing untrusted social-media text, so any service that applies it, or the module-level casual_tokenize, to submitted text can be stalled per request without authentication. Version 3.10.1 bounds the label repetition.",
    "evidence": "osv:DEBIAN-CVE-2026-72818",
    "products": [
      {
        "name": {
          "value": "nltk",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.10.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.10.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.10.3-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.8-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.8.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.9.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.9.1-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.9.2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.9.3-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "nltk",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.10.0-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.10.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.10.3-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.9.1-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.9.2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.9.3-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "nltk",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.10.3-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "3.10.0-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.10.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.9.1-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.9.2-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.9.3-1",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-72818",
      "aliases": [
        "DEBIAN-CVE-2026-72818"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "nltk",
            "purl": "pkg:deb/debian/nltk?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "3.10.0-1",
            "3.10.1-1",
            "3.10.3-1",
            "3.8-1",
            "3.8.1-1",
            "3.9.1-1",
            "3.9.1-2",
            "3.9.2-1",
            "3.9.3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-72818.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "nltk",
            "purl": "pkg:deb/debian/nltk?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "3.10.0-1",
            "3.10.1-1",
            "3.10.3-1",
            "3.9.1-2",
            "3.9.2-1",
            "3.9.3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-72818.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.10.3-1"
                }
              ]
            }
          ],
          "package": {
            "name": "nltk",
            "purl": "pkg:deb/debian/nltk?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "3.10.0-1",
            "3.10.1-1",
            "3.9.1-2",
            "3.9.2-1",
            "3.9.3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-72818.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-27T09:47:35.800364492Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-72818"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-72818"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-72818",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 461141,
  "published_at": "2026-08-20T22:18:05.087+00:00"
}