Skip to content
Heist/ feed
Back to feed
Medium

Twisted: IMAP wildcardToRegexp() ReDoS

Type: advisorySources: OSV

Twisted is an event-based framework for internet applications, supporting Python 3.6+. In 25.5.0 and earlier, wildcardToRegexp() in twisted/mail/imap4.py translates the IMAP asterisk and percent wildcards but passes all other characters from an authenticated client's LIST or LSUB pattern directly to re.compile(), allowing nested or otherwise expensive regular expression constructs to cause catastrophic backtracking when matched against mailbox names. Because Twisted uses a cooperative single-threaded reactor, the blocking match suspends all server input and output for the duration of the match. No fixed release is available as of this review.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-106454
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:38 UTC · Revision 1

Source evidence

Twisted: IMAP wildcardToRegexp() ReDoS

core-osv · Original source

Published 6 Oct 2026, 19:55 UTC

Twisted is an event-based framework for internet applications, supporting Python 3.6+. In 25.5.0 and earlier, wildcardToRegexp() in twisted/mail/imap4.py translates the IMAP asterisk and percent wildcards but passes all other characters from an authenticated client's LIST or LSUB pattern directly to re.compile(), allowing nested or otherwise expensive regular expression constructs to cause catastrophic backtracking when matched against mailbox names. Because Twisted uses a cooperative single-threaded reactor, the blocking match suspends all server input and output for the duration of the match. No fixed release is available as of this review.

osv:CVE-2026-106454
Complete source record
{
  "id": "f69e6e87d61d257511b84c3e3e62b941dbd5d4460c870dcb22591eb1dbef59e3",
  "url": "https://osv.dev/vulnerability/CVE-2026-106454",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Twisted: IMAP wildcardToRegexp() ReDoS",
    "summary": "Twisted is an event-based framework for internet applications, supporting Python 3.6+. In 25.5.0 and earlier, wildcardToRegexp() in twisted/mail/imap4.py translates the IMAP asterisk and percent wildcards but passes all other characters from an authenticated client's LIST or LSUB pattern directly to re.compile(), allowing nested or otherwise expensive regular expression constructs to cause catastrophic backtracking when matched against mailbox names. Because Twisted uses a cooperative single-threaded reactor, the blocking match suspends all server input and output for the duration of the match. No fixed release is available as of this review.",
    "evidence": "osv:CVE-2026-106454",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-106454",
      "aliases": [
        "CVE-2026-106454",
        "GHSA-8pqf-f4m5-798g",
        "PYSEC-2026-4304"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/twisted/twisted",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2f8a3c29246f4eb324690e06a9767a11dc4aec9f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "25.5.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "2f8a3c29246f4eb324690e06a9767a11dc4aec9f"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "before-black"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-106454.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.461115519Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/106xxx/CVE-2026-106454.json",
        "https://github.com/twisted/twisted/security/advisories/GHSA-8pqf-f4m5-798g",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-106454",
        "https://github.com/twisted/twisted/commit/2f8a3c29246f4eb324690e06a9767a11dc4aec9f",
        "https://github.com/twisted/twisted/pull/12788"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-1333"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/106xxx/CVE-2026-106454.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-106454",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 488658,
  "published_at": "2026-10-06T19:55:36.523+00:00"
}