# CVE-2026-42504: Google Go CPU exhaustion in mime WordDecoder.DecodeHeader

Source: https://junglewise.ai/threats/cve-2026-42504-google-go-cpu-exhaustion-in-mime-worddecoder-decodeheader  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-02. Updated: 2026-06-02  
License: CC BY 4.0 with a link back

CVE-2026-42504 · Severity: info · CVSS 0 · Published 2026-06-02

A vulnerability in the Go programming language's standard library can allow an attacker to cause a denial-of-service condition. By sending a specially crafted email or web header, an attacker can force the application to consume excessive processor power, potentially slowing down or crashing the service. This affects any Go-based application that processes MIME headers, such as mail servers or web applications.

Technologies: [stdlib (Go)](https://junglewise.ai/threats/technologies/go-stdlib). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-42504 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42504 being exploited in the wild.

**How severe is CVE-2026-42504?** Informational severity, with a CVSS score of 0, published 2 June 2026.

**Which products and versions are affected?** stdlib (Go) SEMVER:introduced=0,fixed=1.25.11,introduced=1.26.0-0,fixed=1.26.4.

**Is there a fix for CVE-2026-42504?** Yes. stdlib (Go): upgrade to 1.26.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42504 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-42504?** Check whether you run stdlib (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- stdlib (Go): upgrade to 1.26.4 or later

  ```sh
  go get stdlib@v1.26.4
  ```


## Technical details

A vulnerability exists in the 'mime' package's WordDecoder.DecodeHeader function due to quadratic complexity when handling invalid encoded-words. When the decoder encounters an invalid encoded-word, it consumes only the initial '=?' prefix and resumes parsing from that point. An attacker can exploit this by providing a header with many nested or repeated '=?' prefixes followed by a single terminal '?=', causing the decoder to repeatedly re-scan the input. This leads to excessive CPU consumption (Denial of Service). The issue is fixed in Go versions 1.25.11 and 1.26.4.

## Affected products

- Google Go before 1.25.11, 1.26.0 before 1.26.4

## Identifiers

- CVE-2026-42504
- GO-2026-5038

## Timeline

- 2026-05-05: disclosed: Issue opened on Go GitHub repository
- 2026-06-02: advisory: CVE-2026-42504 published
- 2026-06-02: patched: Fixed in Go 1.25.11 and 1.26.4

## References

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

## Related threats

- [Go HTTP/1 server race condition in MaxBytesReader header handling](https://junglewise.ai/threats/cve-2026-97054-for-http-1-servers-when-maxbytesreader-s-limit-is-exceeded)
- [Go crypto/x509 untrusted intermediate certificate validation](https://junglewise.ai/threats/cve-2026-111943-on-most-platforms-go-uses-the-given-system-root-certificates)
- [Go crypto/tls malformed ECH extension DoS](https://junglewise.ai/threats/cve-2026-97031-go-2026-6607-reject-malformed-ech-outer-extension-references-in)
- [Go html/template XSS via missing ES2015+ keywords](https://junglewise.ai/threats/cve-2026-97030-go-2026-6600-recognize-yield-as-regexp-preceder-keyword-in-html)
- [Go html/template XSS via stale context in consecutive expressions](https://junglewise.ai/threats/cve-2026-94448-go-2026-6599-reset-context-tracking-on-consecutive-template)
