Uncontrolled resource consumption when parsing SPDY frames in github.com/moby/spdystream
The SPDY/3 frame parser in spdystream does not validate attacker-controlled counts and lengths before allocating memory. A remote peer that can send SPDY frames to a service using spdystream can cause the process to allocate gigabytes of memory with a small number of malformed control frames, leading to an out-of-memory crash. Three allocation paths in the receive side are affected: 1. SETTINGS entry count: The SETTINGS frame reader reads a 32-bit numSettings from the payload and allocates a slice of that size without checking it against the declared frame length. 2. Header count: parseHeaderValueBlock reads a 32-bit numHeaders from the decompressed header block and allocates an http.Header map of that size with no upper bound. 3. Header field size: Individual header name and value lengths are read as 32-bit integers and used directly as allocation sizes with no validation. Because SPDY header blocks are zlib-compressed, a small on-the-wire payload can decompress into attacker-controlled bytes that the parser interprets as 32-bit counts and lengths. A single crafted frame is enough to exhaust process memory.
02 / AFFECTED SOFTWARE
Affected packages
5 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
The SPDY/3 frame parser in spdystream does not validate attacker-controlled counts and lengths before allocating memory. A remote peer that can send SPDY frames to a service using spdystream can cause the process to allocate gigabytes of memory with a small number of malformed control frames, leading to an out-of-memory crash. Three allocation paths in the receive side are affected: 1. **SETTINGS entry count** -- The SETTINGS frame reader reads a 32-bit `numSettings` from the payload and allocates a slice of that size without checking it against the declared frame length. An attacker can set `numSettings` to a value far exceeding the actual payload, triggering a large allocation before any setting data is read. 2. **Header count** -- `parseHeaderValueBlock` reads a 32-bit `numHeaders` from the decompressed header block and allocates an `http.Header` map of that size with no upper bound. 3. **Header field size** -- Individual header name and value lengths are read as 32-bit integers and used directly as allocation sizes with no validation. Because SPDY header blocks are zlib-compressed, a small on-the-wire payload can decompress into attacker-controlled bytes that the parser interprets as 32-bit counts and lengths. A single crafted frame is enough to exhaust process memory. ## Impact Any program that accepts SPDY connections using spdystream -- directly or through a dependent library -- is affected. A remote peer that can send SPDY frames to the service can crash the process with a single crafted SPDY control frame, causing denial of service. ## Affected versions `github.com/moby/spdystream` <= v0.5.0 ## Fix v0.5.1 addresses the receive-side allocation bugs and adds related hardening: **Core fixes:** - **SETTINGS entry-count validation** -- The SETTINGS frame reader now checks that `numSettings` is consistent with the declared frame length (`numSettings <= (length-4)/8`) before allocating. - **Header count limit** -- `parseHeaderValueBlock` enforces a maximum number of headers per frame (default: 1000). - **Header field size limit** -- Individual header name and value lengths are checked against a per-field size limit (default: 1 MiB) before allocation. - **Connection closure on protocol error** -- The connection read loop now closes the underlying `net.Conn` when it encounters an `InvalidControlFrame` error, preventing further exploitation on the same connection. **Additional hardening:** - **Write-side bounds checks** -- All frame write methods now verify that payloads fit within the 24-bit length field, preventing the library from producing invalid frames. **Configurable limits:** - Callers can adjust the defaults using `NewConnectionWithOptions` or the lower-level `spdy.NewFramerWithOptions` with functional options: `WithMaxControlFramePayloadSize`, `WithMaxHeaderFieldSize`, and `WithMaxHeaderCount`.
The SPDY/3 frame parser in spdystream does not validate attacker-controlled counts and lengths before allocating memory. A remote peer that can send SPDY frames to a service using spdystream can cause the process to allocate gigabytes of memory with a small number of malformed control frames, leading to an out-of-memory crash. Three allocation paths in the receive side are affected: 1. SETTINGS entry count: The SETTINGS frame reader reads a 32-bit numSettings from the payload and allocates a slice of that size without checking it against the declared frame length. 2. Header count: parseHeaderValueBlock reads a 32-bit numHeaders from the decompressed header block and allocates an http.Header map of that size with no upper bound. 3. Header field size: Individual header name and value lengths are read as 32-bit integers and used directly as allocation sizes with no validation. Because SPDY header blocks are zlib-compressed, a small on-the-wire payload can decompress into attacker-controlled bytes that the parser interprets as 32-bit counts and lengths. A single crafted frame is enough to exhaust process memory.
spdystream is a Go library for multiplexing streams over SPDY connections. In versions 0.5.0 and below, the SPDY/3 frame parser does not validate attacker-controlled counts and lengths before allocating memory. Three allocation paths are affected: the SETTINGS frame entry count, the header count in parseHeaderValueBlock, and individual header field sizes — all read as 32-bit integers and used directly as allocation sizes with no bounds checking. Because SPDY header blocks are zlib-compressed, a small on-the-wire payload can decompress into large attacker-controlled values. A remote peer that can send SPDY frames to a service using spdystream can exhaust process memory and cause an out-of-memory crash with a single crafted control frame. This issue has been fixed in version 0.5.1.
05 / REFERENCES
Further evidence
- https://github.com/moby/spdystream
- https://github.com/moby/spdystream/commit/ef6121f62c730110bf5ae604a865a8613bfb787f
- https://github.com/moby/spdystream/releases/tag/v0.5.1
- https://github.com/moby/spdystream/security/advisories/GHSA-pc3f-x583-g7j2
- https://nvd.nist.gov/vuln/detail/CVE-2026-35469
- https://access.redhat.com/errata/RHSA-2026:11070
- https://access.redhat.com/errata/RHSA-2026:11217
- https://access.redhat.com/errata/RHSA-2026:12118
- https://access.redhat.com/errata/RHSA-2026:13791
- https://access.redhat.com/errata/RHSA-2026:13829
- https://access.redhat.com/errata/RHSA-2026:17121
- https://access.redhat.com/errata/RHSA-2026:17123
- https://access.redhat.com/errata/RHSA-2026:17449
- https://access.redhat.com/errata/RHSA-2026:17468
- https://access.redhat.com/errata/RHSA-2026:17469
- https://access.redhat.com/errata/RHSA-2026:17475
- https://access.redhat.com/errata/RHSA-2026:17598
- https://access.redhat.com/errata/RHSA-2026:17599
- https://access.redhat.com/errata/RHSA-2026:17704
- https://access.redhat.com/errata/RHSA-2026:19099
- https://access.redhat.com/errata/RHSA-2026:19108
- https://access.redhat.com/errata/RHSA-2026:20034
- https://access.redhat.com/errata/RHSA-2026:20041
- https://access.redhat.com/errata/RHSA-2026:20042
- https://access.redhat.com/errata/RHSA-2026:20089
- https://access.redhat.com/errata/RHSA-2026:21658
- https://access.redhat.com/errata/RHSA-2026:21692
- https://access.redhat.com/errata/RHSA-2026:21697
- https://access.redhat.com/errata/RHSA-2026:23235
- https://access.redhat.com/errata/RHSA-2026:25009
- https://access.redhat.com/errata/RHSA-2026:25046
- https://access.redhat.com/errata/RHSA-2026:25187
- https://access.redhat.com/errata/RHSA-2026:25194
- https://access.redhat.com/errata/RHSA-2026:25201
- https://access.redhat.com/errata/RHSA-2026:25207
- https://access.redhat.com/errata/RHSA-2026:27004
- https://access.redhat.com/errata/RHSA-2026:27010
- https://access.redhat.com/errata/RHSA-2026:27063
- https://access.redhat.com/errata/RHSA-2026:27903
- https://access.redhat.com/errata/RHSA-2026:27914
- https://access.redhat.com/errata/RHSA-2026:27941
- https://access.redhat.com/errata/RHSA-2026:27983
- https://access.redhat.com/errata/RHSA-2026:29795
- https://access.redhat.com/errata/RHSA-2026:29801
- https://access.redhat.com/errata/RHSA-2026:29835
- https://access.redhat.com/errata/RHSA-2026:29857
- https://access.redhat.com/errata/RHSA-2026:29858
- https://access.redhat.com/errata/RHSA-2026:29865
- https://access.redhat.com/errata/RHSA-2026:33071
- https://access.redhat.com/errata/RHSA-2026:33078
- https://access.redhat.com/errata/RHSA-2026:34050
- https://access.redhat.com/errata/RHSA-2026:34099
- https://access.redhat.com/errata/RHSA-2026:34100
- https://access.redhat.com/errata/RHSA-2026:34755
- https://access.redhat.com/errata/RHSA-2026:34766
- https://access.redhat.com/errata/RHSA-2026:34769
- https://access.redhat.com/errata/RHSA-2026:34791
- https://access.redhat.com/errata/RHSA-2026:34794
- https://access.redhat.com/errata/RHSA-2026:36162
- https://access.redhat.com/errata/RHSA-2026:36621
- https://access.redhat.com/errata/RHSA-2026:36796
- https://access.redhat.com/errata/RHSA-2026:37187
- https://access.redhat.com/errata/RHSA-2026:37193
- https://access.redhat.com/errata/RHSA-2026:37387
- https://access.redhat.com/errata/RHSA-2026:37580
- https://access.redhat.com/errata/RHSA-2026:37581
- https://access.redhat.com/errata/RHSA-2026:37629
- https://access.redhat.com/errata/RHSA-2026:40022
- https://access.redhat.com/errata/RHSA-2026:40023
- https://access.redhat.com/errata/RHSA-2026:40030
- https://access.redhat.com/errata/RHSA-2026:40828
- https://access.redhat.com/errata/RHSA-2026:41019
- https://access.redhat.com/errata/RHSA-2026:43227
- https://access.redhat.com/errata/RHSA-2026:43253
- https://access.redhat.com/errata/RHSA-2026:44237
- https://access.redhat.com/errata/RHSA-2026:44267
- https://access.redhat.com/errata/RHSA-2026:47728
- https://access.redhat.com/errata/RHSA-2026:47729
- https://access.redhat.com/errata/RHSA-2026:51007
- https://access.redhat.com/errata/RHSA-2026:51013
- https://access.redhat.com/errata/RHSA-2026:51022
- https://access.redhat.com/errata/RHSA-2026:51422
- https://access.redhat.com/errata/RHSA-2026:53655
- https://access.redhat.com/errata/RHSA-2026:56431
- https://access.redhat.com/security/cve/CVE-2026-35469
- https://bugzilla.redhat.com/show_bug.cgi?id=2457729
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35469.json
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-35469.json