KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 06:26 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-115774

Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH

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.

At a glance

Exploited
Not known
Severity
4.9 Medium (CVSS 3.1)
Chance of exploitation
0.4% in the next 30 days
Sources
1 source

What to do

GitHub lists first patched versions: Twisted: 26.10.0rc1. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-2qrf-pqgx-qh9v (opens a new tab)

What happened

## 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

Continue reading

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 continuation path, not this inline branch.

The call is reached from `select_SEARCH` through `arg_searchkeys`, dispatched only in the selected state, so a valid login and a selected mailbox (any low-privilege account) suffice. It runs in the reactor thread, and the connection timeout cannot fire because the reactor itself is frozen.

Affected product: Twisted (`twisted.mail`), the IMAP4 server `twisted.mail.imap4.IMAP4Server` Affected versions: 26.4.0 and earlier

## PoC

Log in, select a mailbox, and send a `SEARCH` whose literal size is negative:

```text C: t1 LOGIN testuser password-test C: t2 SELECT INBOX C: t3 SEARCH {-100}zzzzzzzzzz ```

The server never responds and one core stays at 100 percent. In a measured run a health service co-hosted on the same reactor stopped answering the instant the command arrived, showing the freeze hits the whole process and not just the attacking connection. A valid `{5}zzzzz` completes normally and a non-numeric `{abc}` is rejected with a parse error, which isolates the cause to the missing negative-size check.

## Impact

A remote denial of service. One command of about ten bytes freezes the single-threaded reactor, so it stops serving not only every other IMAP connection but every other service co-hosted in the same process (for example SMTP and POP3 under `twistd mail`), and no timeout can recover it until the process is restarted. It requires an authenticated session, so any account holder can trigger it; there is no confidentiality or integrity impact and no code execution.

Affected package ranges reported by GitHub: Twisted: <= 26.4.0

Scores and how they were measured

CVSS base severity

4.9

Version 3.1As of

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

0.4%

Scored Percentile 37.0%

Model and measurement source (opens a new tab)

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-2qrf-pqgx-qh9v (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-2qrf-pqgx-qh9v, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  3. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-2qrf-pqgx-qh9v, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  4. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-2qrf-pqgx-qh9v, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  5. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-2qrf-pqgx-qh9v, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  6. Primary source

    FIRST measured EPSS score (opens a new tab)

    Measured EPSS probability and percentile for CVE-2026-115774, scored 2026-10-26. This is a model estimate, not proof of exposure.

    Published Checked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 23). Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH (CVE-2026-115774). https://kevwire.com/record/CVE-2026-115774

MLA

"Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH (CVE-2026-115774)." KEVWire, 23 Oct. 2026, kevwire.com/record/CVE-2026-115774.

Chicago

KEVWire. "Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH (CVE-2026-115774)." Last modified October 23, 2026. https://kevwire.com/record/CVE-2026-115774.

Evidence summary (plain text)

Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH (Oct 23, 2026).
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.

Meeting an inline literal, `parseNestedParens` reads the size between the braces and advances the cursor past the body:
CVSS 4.9 (version 3.1; evidence as of Oct 23, 2026; https://github.com/advisories/GHSA-2qrf-pqgx-qh9v).
EPSS 0.4% for the following 30 days, scored Oct 26, 2026 (https://api.first.org/data/v1/epss?cve=CVE-2026-115774&date=2026-10-26).
Sources:
GitHub-reviewed advisory GHSA-2qrf-pqgx-qh9v: https://github.com/advisories/GHSA-2qrf-pqgx-qh9v
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc&after=Y3Vyc29yOnYyOpK0MjAyNi0xMC0yM1QyMDo1MTozMFrOAAf0Mg%3D%3D
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc&after=Y3Vyc29yOnYyOpK0MjAyNi0xMC0yM1QyMDo0OToxMlrOAAf0LQ%3D%3D
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc&after=Y3Vyc29yOnYyOpK0MjAyNi0xMC0yM1QyMDo0NzoxN1rOAAf0Kg%3D%3D
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
FIRST measured EPSS score: https://api.first.org/data/v1/epss?cve=CVE-2026-115774&date=2026-10-26
Record ID: CVE-2026-115774.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 01:40 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail