# CVE-2026-56859: Go DecodeElement stack exhaustion vulnerability

Source: https://junglewise.ai/threats/cve-2026-56859-go-decodeelement-stack-exhaustion-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-13. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-56859 · Severity: high · CVSS 7.5 · Published 2026-08-13

A vulnerability in Go's XML processing component allows attackers to cause a denial of service by exhausting the application's stack memory. The DecodeElement function fails to properly enforce recursion depth limits, permitting an attacker to trigger uncontrolled memory consumption and crash the affected service.

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

## Quick answers

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

**How severe is CVE-2026-56859?** High severity, with a CVSS score of 7.5, published 13 August 2026.

**Which products and versions are affected?** stdlib (Go) SEMVER:introduced=0,fixed=1.25.13,introduced=1.26.0-0,fixed=1.26.6,introduced=1.27.0-0,fixed=1.27.0-rc.3.

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

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

**Am I affected by CVE-2026-56859?** 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.27.0-rc.3 or later

  ```sh
  go get stdlib@v1.27.0-rc.3
  ```


## Technical details

The vulnerability exists in Go's XML decoding functionality, specifically in the DecodeElement function which handles recursive XML element parsing. The function improperly resets an internal depth counter, preventing the depth limit check from ever triggering. An attacker can craft a malicious XML document with deeply nested elements that bypasses the recursion limit, causing unbounded stack growth and leading to stack exhaustion. The vulnerability is triggered via network-supplied XML input without requiring authentication or special privileges. A patch addressing the depth counter reset logic is available in Go's repository.

## Affected products

- Google Go <unknown>

## Identifiers

- CVE-2026-56859
- GO-2026-6088

## Timeline

- 2026-08-13: disclosed

## References

- [https://pkg.go.dev/](https://pkg.go.dev/)
- [https://go.dev/cl/803320](https://go.dev/cl/803320)

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