Skip to main content

Twisted IMAP4 Server CVE-2026-115774

| EUVDEUVD-2026-109148 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-10-23 GitHub_M GHSA-2qrf-pqgx-qh9v
4.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with any low-privilege IMAP account
  2. Delivery
    Enter selected mailbox state via SELECT
  3. Exploit
    Send SEARCH with negative literal size {-100}
  4. Execution
    Parser cursor wraps negative, reactor loops forever
  5. Impact
    Entire process (IMAP/SMTP/POP3) denied service until restart

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption 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: (1) a Twisted deployment actually running twisted.mail.imap4.IMAP4Server (e.g. twistd mail); (2) a valid authenticated session - the vulnerable select_SEARCH/arg_searchkeys path is only dispatched in the selected state, so the attacker must LOGIN successfully and SELECT a mailbox; and (3) a SEARCH command carrying an inline literal with a negative octet count (e.g. {-100}), which parseNestedParens fails to reject. The pre-existing _literalStringLimit guard does not cover this inline branch. Limiting factors: exploitation needs valid credentials (authenticated per the CVSS vector's PR metric, and per the advisory any low-privilege account is sufficient); it only affects installations exposing the Twisted IMAP4 server, which is a minority of Twisted deployments. Aggravating factor: because the reactor is single-threaded, the freeze also stops all other connections and any SMTP/POP3 services sharing the process, and the connection timeout cannot fire because the reactor itself is frozen.

Impact

This is a genuine but moderate-priority availability issue, not a drop-everything emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H, base 4.9 MEDIUM) and CWE-400/CWE-835 agree on the mechanism: a single authenticated SEARCH command containing a negative IMAP literal size (e.g. {-100}) drives twisted.mail.imap4.parseNestedParens into a non-terminating loop that pins the single-threaded reactor at 100% CPU, denying service to every connection and every other service (SMTP/POP3) co-hosted in the same process until restart. No confidentiality or integrity impact and no code execution. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a MEDIUM DoS. Signals are mostly aligned, but with one notable conflict: the input CVSS encodes PR:H (high privilege), whereas the GHSA advisory explicitly states 'any low-privilege account' / 'any account holder can trigger it' after a normal login and mailbox SELECT - this points to PR:L, which would raise the realistic risk slightly. No EPSS score and no CISA KEV entry were provided (exploitation status: no active exploitation confirmed), so there is no evidence of in-the-wild use; the GHSA advisory does, however, publish concrete reproduction steps. The required authenticated session and the relatively niche deployment of Twisted's IMAP4 mail server are the main factors keeping real-world risk below the raw network-reachable framing.

Exploit ScenarioDerived

An attacker who holds any valid mailbox account (or has obtained low-privilege credentials) logs into a Twisted-based IMAP4 server, issues SELECT INBOX to enter the selected state, then sends a SEARCH command whose literal size is negative, e.g. 'SEARCH {-100}zzzzzzzzzz'. The reactor enters an infinite synchronous scanning loop and freezes the entire process, taking down all IMAP connections plus any SMTP/POP3 services hosted in the same twistd mail process until manual restart. The GHSA advisory includes working reproduction steps (login → select → crafted SEARCH), so a reliable trigger is publicly documented.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 23, 2026

An authenticated denial of service in the Twisted IMAP4 server (twisted.mail.imap4.IMAP4Server) lets any user who can log in and SELECT a mailbox freeze the entire process by sending a SEARCH command with an inline literal carrying a negative octet count. The advisory demonstrates this with a roughly ten-byte command (SEARCH {-100}...), after which the single-threaded reactor spins at full CPU and stops serving not only other IMAP connections but also any SMTP or POP3 services co-hosted in the same process; no connection timeout can fire because the reactor itself is frozen, so recovery requires a restart. The issue affects Twisted 26.4.0 and earlier and is fixed in 26.10.0rc1; exploitation requires valid credentials (per the assessed vector PR:L, and the advisory notes any low-privilege account suffices), and the upstream advisory includes a public proof-of-concept command sequence. This is a genuine but moderate-priority availability issue rather than a drop-everything emergency, and it is confined to the minority of Twisted deployments that actually expose the IMAP4 server.

RemediationAI

Vendor-released patch: Twisted 26.10.0rc1. Upgrade the Twisted package to 26.10.0rc1 or later; because that is a release candidate, track the GitHub advisory at https://github.com/twisted/twisted/security/advisories/GHSA-2qrf-pqgx-qh9v for the corresponding stable release before relying on it in production. If an immediate upgrade is not possible, the fix itself is a two-line sign check that raises ValueError for a negative literal size in parseNestedParens, available as pull request https://github.com/twisted/twisted/pull/12764 and commit https://github.com/twisted/twisted/commit/3d125548bcbe955007cb97f480bb699a5e074741, which can be backported. Compensating controls, given that the trigger requires an authenticated session in the selected mailbox state: restrict IMAP account issuance and credentials to trusted users, since any valid low-privilege account is enough to freeze the process (trade-off: does not protect against a malicious or compromised legitimate user); run the IMAP4 server in its own process rather than co-hosting SMTP and POP3 on the same reactor under twistd mail, so a freeze does not take down mail submission and retrieval (trade-off: more processes to supervise and separate configuration); and supervise the process with an external watchdog that restarts it on unresponsiveness, since the reactor freeze means in-process connection timeouts and health checks cannot fire (trade-off: restart drops all active sessions).

Affected VersionsENISA

twisted < 26.10.0rc1

Affected Packages

pypi twisted fix: 26.10.0rc1

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

Twisted is an event-driven Python networking framework built around a single-threaded reactor, and twisted.mail.imap4.IMAP4Server is its IMAP4 protocol implementation. In parseNestedParens, an inline literal's octet count is read with int() and never sign-checked; a value such as {-100} therefore produces a negative cursor offset. Because Python negative indices wrap around the end of the buffer instead of raising, the scanning loop's termination condition remains true indefinitely and s[i:i+1] keeps returning data, so the loop never exits (CWE-835 infinite loop, classified under CWE-400 uncontrolled resource consumption). The call is reached from select_SEARCH via arg_searchkeys, which is only dispatched once the session is in the selected state, so a successful LOGIN and SELECT are prerequisites. The existing _literalStringLimit guard covers only the synchronizing-literal continuation path, not this inline branch. Because the loop executes synchronously on the reactor thread, the whole process stalls, and a health service co-hosted on the same reactor in the advisory's measured run stopped responding immediately. There is no confidentiality or integrity impact and no code execution.

Know when Twisted 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

Vendor (GitHub_M) PRIMARY 4.9 MEDIUM
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 6.5 MEDIUM

Network-reachable IMAP, low complexity single command, but needs a valid low-privilege authenticated session per the advisory (PR:L, not PR:H); impact is availability-only (A:H).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

1
Patch available
Oct 23, 2026 - 21:18 EUVD

DescriptionCVE.org

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Prior to 26.10.0rc1, twisted.mail.imap4.IMAP4Server reaches twisted.mail.imap4.parseNestedParens with a negative literal size in an authenticated SEARCH command after the client enters the selected mailbox state. The negative size moves the parser cursor below zero, and Python's negative indexing prevents the synchronous scanning loop from terminating. The loop freezes the single-threaded reactor, stopping other IMAP connections and any SMTP or POP3 services hosted in the same process until restart. This issue is fixed in version 26.10.0rc1.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 5 pypi packages depend on twisted (5 direct, 0 indirect)

Ecosystem-wide dependent count for version 26.10.0rc1.

Threat Intelligence Overview

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Low
Twisted is common in Python, but its IMAP4 mail server is seldom deployed
Threat Intel
1
1 source
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

25
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2020-10109 CRITICAL POC
9.8 Mar 12

In Twisted Web through 19.10.0, there was an HTTP request splitting vulnerability. Rated critical severity (CVSS 9.8), t

CVE-2020-10108 CRITICAL POC
9.8 Mar 12

In Twisted Web through 19.10.0, there was an HTTP request splitting vulnerability. Rated critical severity (CVSS 9.8), t

CVE-2022-21716 HIGH POC
7.5 Mar 03

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Rated high severity (CVSS 7.5), t

CVE-2024-41810 MEDIUM POC
6.1 Jul 29

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Rated medium severity (CVSS 6.1),

CVE-2019-12387 MEDIUM POC
6.1 Jun 10

In Twisted before 19.2.1, twisted.web did not validate or sanitize URIs or HTTP methods, allowing an attacker to inject

CVE-2022-39348 MEDIUM POC
5.4 Oct 26

Twisted is an event-based framework for internet applications. Rated medium severity (CVSS 5.4), this vulnerability is r

CVE-2023-46137 MEDIUM POC
5.3 Oct 25

Twisted is an event-based framework for internet applications. Rated medium severity (CVSS 5.3), this vulnerability is r

CVE-2026-115775 HIGH
8.7 Oct 23

Unauthenticated memory exhaustion in Twisted's twisted.words.xish.domish XML element stream allows a remote peer to keep

CVE-2022-24801 HIGH
8.1 Apr 04

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Rated high severity (CVSS 8.1), t

CVE-2026-115778 HIGH
7.5 Oct 23

Unauthenticated remote memory exhaustion in Twisted's conch telnet transport lets any peer that can reach an exposed tel

CVE-2026-115776 HIGH
7.5 Oct 23

Unauthenticated remote memory exhaustion in Twisted's IRC server (twisted.words) lets a single TCP connection that never

CVE-2019-12855 HIGH
7.4 Jun 16

In words.protocols.jabber.xmlstream in Twisted through 19.2.1, XMPP support did not verify certificates when used with T

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy