Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to IMAP server
-
DeliveryCraft malicious LIST/LSUB wildcard pattern
-
ExploitPattern passed unescaped to re.compile()
-
ExecutionTrigger catastrophic regex backtracking
-
ImpactSingle-threaded reactor blocks all I/O
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated IMAP session (PR:L) against a Twisted-based IMAP4 server (version 25.5.0 or earlier) that exposes LIST or LSUB commands - i.e., the deployment must actually run Twisted's twisted.mail.imap4 server component. The attacker must supply a LIST/LSUB mailbox pattern containing regex metacharacters beyond the IMAP '*' and '%' wildcards (e.g., nested quantifiers) that Twisted forwards directly to re.compile(). Limiting factors: valid credentials are mandatory (no unauthenticated path), and impact is confined to availability; exploitation is amplified by Twisted's cooperative single-threaded reactor, which lets a single malicious match stall the entire server. No fixed release is available, so mitigation currently depends on access controls or input filtering rather than patching. |
| Impact | This is a genuine but modest-priority issue, not a top-tier emergency. The CVSS 3.1 base score of 4.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L) correctly captures a network-reachable, low-complexity denial-of-service with availability-only impact and no confidentiality or integrity loss. The PR:L metric confirms exploitation requires an authenticated IMAP session, which meaningfully limits the attacker population to users who already hold valid mailbox credentials. No EPSS score, SSVC decision, or CISA KEV entry was provided in the input, and no public exploit was referenced, so there is no public exploit identified at time of analysis; the absence of these signals is consistent with a low-urgency, authenticated DoS rather than mass exploitation. One nuance worth flagging: although CVSS scope is marked S:U, the real-world blast radius is larger than a single session because Twisted's cooperative single-threaded reactor means one blocking regex match suspends ALL server I/O for every connected client - effectively a full-server stall triggered by one authenticated user. This systemic amplification is not reflected in the S:U/A:L scoring and should be weighed up for any multi-tenant IMAP deployment. Critically, no fixed release is available as of this review, so defenders cannot simply patch; this raises operational risk relative to the low score. |
| Exploit ScenarioDerived | An authenticated IMAP user issues a LIST or LSUB command whose pattern contains nested or otherwise pathological regular-expression constructs that Twisted passes directly to re.compile(). When matched against mailbox names this triggers catastrophic backtracking, and because the reactor is single-threaded the match blocks all other client traffic for the duration. No public exploit code was referenced, but the vulnerable path and fix are documented in the GHSA advisory and the linked commit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 06, 2026
Authenticated users of Twisted-based IMAP4 servers (Twisted 25.5.0 and earlier running the twisted.mail.imap4 server component) can stall the entire service by supplying a crafted LIST or LSUB mailbox pattern whose regex metacharacters survive wildcardToRegexp() and reach re.compile(), triggering catastrophic backtracking. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L, base 4.3) confirms this is a network-reachable availability issue that requires valid credentials and has no impact on confidentiality or integrity. Because Twisted's cooperative single-threaded reactor performs the match inline, a single expensive match suspends all server input and output for its duration; no public exploit code has been identified at time of analysis, and this is a genuine but modest-priority issue rather than a top-tier emergency.
RemediationAI
No vendor-released patch version has been confirmed as of this review - the project states no fixed release is available, so the status is best described as an upstream fix available via commit/PR (2f8a3c29246f4eb324690e06a9767a11dc4aec9f, PR 12788) with a released patched version not independently confirmed; track the advisory at https://github.com/twisted/twisted/security/advisories/GHSA-8pqf-f4m5-798g for the eventual release. The most direct action is to backport that commit, which escapes every non-wildcard character before re.compile(), into the deployed twisted/mail/imap4.py and rebuild/verify; this is a small, self-contained change but you carry the maintenance burden until an official release ships. Where code changes are not possible, prioritise access control: the attack requires valid credentials (PR:L), so auditing and tightly limiting IMAP accounts, disabling self-registration, and revoking dormant accounts removes or narrows the attacker pool - the trade-off is reduced user convenience and it does nothing against a malicious insider. A fronting IMAP proxy or connection filter that rejects LIST/LSUB patterns containing regex metacharacters other than '*' and '%' (notably '(', ')', '{', '}', '+', '|', '\') will block the known payload shapes, but mailbox names legitimately containing those characters will be rejected, so this is a blunt control. Isolating each IMAP connection into its own worker process limits the blast radius of a stalled reactor from whole-server to single-connection at the cost of added memory/CPU and architectural complexity, and swapping Python's re for the third-party 'regex' module with an explicit match timeout is another code-level option that requires careful testing of pattern semantics.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-1333 (Inefficient Regular Expression Complexity), a classic ReDoS pattern rooted in how Twisted's twisted.mail.imap4.wildcardToRegexp() translated IMAP mailbox-list patterns into Python regular expressions. IMAP defines only two wildcards - '*' (match anything) and '%' (match anything except the hierarchy delimiter) - but the vulnerable implementation performed a simple string replace of those two tokens and then handed every remaining character from the client-supplied pattern straight to re.compile(). Any regex metacharacters the client included (nested groups, quantifiers such as '+', '*', '{n,m}', alternation, etc.) therefore became active regex syntax, and constructs with overlapping or nested quantifiers can force exponential backtracking when the compiled pattern is matched against mailbox names. Twisted's server runs on a cooperative single-threaded reactor, so the blocking match is not confined to one request: the event loop cannot service any other connection until the match completes, turning a per-request ReDoS into a whole-server stall. The upstream fix (commit 2f8a3c29246f4eb324690e06a9767a11dc4aec9f, PR 12788) rewrites wildcardToRegexp() to split the pattern on the two IMAP wildcards and apply re.escape() to every other segment before compilation, preserving wildcard semantics while neutralising attacker-supplied regex syntax.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Network-reachable but requires an authenticated IMAP session (PR:L); low complexity, availability-only impact; scope kept S:U as impact stays within the same server authority.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 1,499 pypi packages depend on twisted (433 direct, 1,089 indirect)
Ecosystem-wide dependent count for version 26.4.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-93873
GHSA-8pqf-f4m5-798g
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB