Twisted is an event-based framework for internet applications, supporting Python 3.6+.
CVE-2026-115774
Summary An infinite-loop vulnerability (CWE-835) in the Twisted IMAP4 server lets an authenticated client freeze the whole process with one small command. twisted.mail.imap4.parseNestedParens reads an IMAP literal size with int() and never rejects a negative value. A negative size such as {-100} drives the parser cursor negative, and because a negative Python index wraps around the end of the string instead of raising, the scanning loop never terminates. It runs synchronously on the single-threaded reactor, so one SEARCH command holds the reactor at full CPU forever and every other connection stops being served. Details Meeting an inline literal, parseNestedParens reads the size between the braces and advances the cursor past the body: python twisted/mail/imap4.py parseNestedParens literalSize = int(s[i + 1 : end]) # no sign check contentStack[-1].append((s[end + 3 : end + 3 + literalSize],)) i = end + 3 + literalSize # negative size -> i goes negative int(b"-100") is -100, so i goes negative; the loop condition i < len(s) stays true and s[i : i + 1] on a negative index never raises, so the cursor cycles forever. The literalStringLimit guard only covers the synchronizing-literal…
Assessment
- CVSS
- 4.9 (v3.1)
- Severity
- Medium
- EPSS
- 0.0043% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 23 October 2026
- Last updated
- 29 October 2026
- Affected
- pip · Twisted
- Weakness
- CWE-400, CWE-835
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
At the source
References
- https://github.com/twisted/twisted/commit/3d125548bcbe955007cb97f480bb699a5e074741
- https://github.com/twisted/twisted/pull/12764
- https://github.com/twisted/twisted/releases/tag/twisted-26.10.0rc1
- https://github.com/twisted/twisted/security/advisories/GHSA-2qrf-pqgx-qh9v
- https://github.com/advisories/GHSA-2qrf-pqgx-qh9v
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-115774