# CVE-2026-104874: Multidict: Reference leak in CIMultiDict/MultiDict items-view union and subtraction

> Attackers can cause unbounded memory growth and denial of service by triggering reference leaks in specific multidict operations.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Oct 2026
- **Updated:** 5 Oct 2026
- **Also known as:** CLEANSTART-2026-YA90278, ECHO-4642-8da4-6164, GHSA-54p9-h82j-f925, MINI-2mj5-v592-8p4f, MINI-498w-x5rh-23jf, MINI-4gjq-gmvh-7fmv, MINI-5cx6-rwvj-hfhr, MINI-7296-2pgw-g76v, MINI-74qr-5m45-m9gq, MINI-76f7-xrjc-3r5r, MINI-8xp6-qp9j-9fc7, MINI-935h-8cgp-vghf, MINI-cppc-43x8-q7p4, MINI-crcf-j2c9-58hh, MINI-f4rg-9qxq-3jvf, MINI-f5qj-2g9v-pp8v, MINI-fm4p-v852-j3w2, MINI-grrj-5mrr-3hv2, MINI-h62g-fv2g-rph3, MINI-h86v-h4r7-98hr, MINI-j32h-7wc2-vc7f, MINI-jh6v-mcx9-cr2w, MINI-jpx8-ggjx-6p4q, MINI-jq75-xfhw-hgjq, MINI-m8j3-j2g8-5mc8, MINI-pcm2-fv77-9g5p, MINI-pfgw-8x25-22wf, MINI-qq95-52vw-582r, MINI-r86r-c4r3-934f, MINI-v628-x2f3-w95h, MINI-vh4j-q67c-6vmg, MINI-xh3p-jjg8-rpp5, PYSEC-2026-4244, UBUNTU-CVE-2026-104874, openSUSE-SU-2026:12117-1

## What is CVE-2026-104874?

CVE-2026-104874 is a medium-severity denial of service vulnerability in aio-libs multidict, published on 2 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Multidict is an implementation of a multidict data structure. From 6.7.0 until 6.9.1, the C extension's items-view reflected union operation, operand | d.items(), in multidict_itemsview_or2_impl and subtraction operation, d.items() - operand, in multidict_itemsview_sub1_impl fail to release new key-identity and value references returned for each operand element. Applications that perform these operations over attacker-influenced sequences can leak two strong references per element, and garbage collection cannot reclaim them, so repeated operations can cause unbounded process memory growth and denial of service. Forward union, intersection, non-tuple operand elements, and pure-Python builds are not affected by this reference leak. This issue is fixed in version 6.9.1.

Weakness: CWE-401 (Missing Release of Memory after Effective Lifetime)

## Which versions are affected by CVE-2026-104874?

3 open source packages ship an affected version, including multidict.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `multidict` | PyPI | From 6.7.0 | 6.9.1 |
| `multidict` | PyPI | From 6.7.0 | 6.9.1 |
| `multidict` | PyPI | From 6.7.0 | 6.9.1 |
| `python-multidict` | openSUSE:Tumbleweed | All versions | 7.0.0-1.1 |

## How do I fix CVE-2026-104874?

Upgrade multidict to 6.9.1 or later.

## Is CVE-2026-104874 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-104874 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-104874 and fix it if it is affected.

What it is: CVE-2026-104874 is a medium-severity denial of service vulnerability in aio-libs multidict, published on 2 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-104874 exists.

Affected packages and fixed versions:
- multidict (PyPI): affected from 6.7.0; fixed in 6.9.1
- multidict (PyPI): affected from 6.7.0; fixed in 6.9.1
- multidict (PyPI): affected from 6.7.0; fixed in 6.9.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-104874/ (Markdown: https://insights.sbomify.com/CVE-2026-104874/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-104874
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-104874
- OSV: https://osv.dev/vulnerability/CVE-2026-104874

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-104874/
Summaries are generated and may contain mistakes; the official description above is the record.
