CVE-2026-106454: Twisted ReDoS in IMAP4 wildcard pattern parsing

CVE-2026-106454 · Severity: medium · CVSS 4.3 · Published 2026-10-06

Twisted is an event-based framework for building Python internet applications, including mail servers. An authenticated attacker can send specially crafted IMAP LIST or LSUB commands with malicious wildcard patterns that cause the server to perform expensive regular expression matching, blocking all server operations until the match completes.

Technologies: twisted (PyPI), Twisted. Vendors: PyPI, Twisted.

Quick answers

Is CVE-2026-106454 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-106454 being exploited in the wild.
How severe is CVE-2026-106454?
Medium severity, with a CVSS score of 4.3, published 6 October 2026.
Which products and versions are affected?
twisted (PyPI) <= 25.5.0, ECOSYSTEM:introduced=0,last_affected=25.5.0; Twisted 25.5.0 and earlier.
Is there a fix for CVE-2026-106454?
A patch was published on 2026-08-15: Fix merged to trunk via PR #12788 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-106454 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-106454?
Check whether you run twisted (PyPI) or Twisted at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The wildcardToRegexp() function in twisted/mail/imap4.py insufficiently escapes user-supplied wildcard patterns before passing them to re.compile(), allowing authenticated clients to inject regex constructs that cause catastrophic backtracking (ReDoS). The single-threaded cooperative reactor blocks on the expensive regex match, suspending all server I/O during the attack.

Affected products

  • Twisted Twisted 25.5.0 and earlier

Identifiers

  • CVE-2026-106454
  • GHSA-8pqf-f4m5-798g
  • PYSEC-2026-4304

Timeline

  • 2026-10-06: disclosed
  • 2026-08-15: patched: Fix merged to trunk via PR #12788

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.