{"id":"GHSA-pc3f-x583-g7j2","revision":"e686230484394b3a9e664c052cb009ef","records":[{"revision":"e686230484394b3a9e664c052cb009ef","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-pc3f-x583-g7j2","aliases":["CVE-2026-35469","GO-2026-4958"],"title":"SpdyStream: DOS on CRI","description":"The SPDY/3 frame parser in spdystream does not validate\nattacker-controlled counts and lengths before allocating memory. A\nremote peer that can send SPDY frames to a service using spdystream can\ncause the process to allocate gigabytes of memory with a small number of\nmalformed control frames, leading to an out-of-memory crash.\n\u00A0\nThree allocation paths in the receive side are affected:\n1. **SETTINGS entry count** -- The SETTINGS frame reader reads a 32-bit\n`numSettings` from the payload and allocates a slice of that size\nwithout checking it against the declared frame length. An attacker\ncan set `numSettings` to a value far exceeding the actual payload,\ntriggering a large allocation before any setting data is read.\n\u00A0\n2. **Header count** -- `parseHeaderValueBlock` reads a 32-bit\n`numHeaders` from the decompressed header block and allocates an\n`http.Header` map of that size with no upper bound.\n\u00A0\n3. **Header field size** -- Individual header name and value lengths are\nread as 32-bit integers and used directly as allocation sizes with\nno validation.\n\u00A0\nBecause SPDY header blocks are zlib-compressed, a small on-the-wire\npayload can decompress into attacker-controlled bytes that the parser\ninterprets as 32-bit counts and lengths. A single crafted frame is\nenough to exhaust process memory.\n## Impact\n\u00A0Any program that accepts SPDY connections using spdystream -- directly\nor through a dependent library -- is affected. A remote peer that can\nsend SPDY frames to the service can crash the process with a single\ncrafted SPDY control frame, causing denial of service.\n## Affected versions\n\u00A0`github.com/moby/spdystream` <= v0.5.0\n## Fix\n\u00A0v0.5.1 addresses the receive-side allocation bugs and adds related\nhardening:\n\u00A0\n**Core fixes:**\n\u00A0\n- **SETTINGS entry-count validation** -- The SETTINGS frame reader now\nchecks that `numSettings` is consistent with the declared frame\nlength (`numSettings <= (length-4)/8`) before allocating.\n\u00A0\n- **Header count limit** -- `parseHeaderValueBlock` enforces a maximum\nnumber of headers per frame (default: 1000).\n\u00A0\n- **Header field size limit** -- Individual header name and value\nlengths are checked against a per-field size limit (default: 1 MiB)\nbefore allocation.\n\u00A0\n- **Connection closure on protocol error** -- The connection read loop\nnow closes the underlying `net.Conn` when it encounters an\n`InvalidControlFrame` error, preventing further exploitation on the\nsame connection.\n\u00A0\n**Additional hardening:**\n\u00A0\n- **Write-side bounds checks** -- All frame write methods now verify\nthat payloads fit within the 24-bit length field, preventing the\nlibrary from producing invalid frames.\n\u00A0\n**Configurable limits:**\n\u00A0\n- Callers can adjust the defaults using `NewConnectionWithOptions` or\nthe lower-level `spdy.NewFramerWithOptions` with functional options:\n`WithMaxControlFramePayloadSize`, `WithMaxHeaderFieldSize`, and\n`WithMaxHeaderCount`.\n\u00A0","state":0,"publishedAt":"2026-04-16T20:44:01+00:00","modifiedAt":"2026-09-10T03:51:02.5231095+00:00","affected":[{"ecosystem":"Go","name":"github.com/moby/spdystream","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.5.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/moby/spdystream/security/advisories/GHSA-pc3f-x583-g7j2","https://nvd.nist.gov/vuln/detail/CVE-2026-35469","https://github.com/moby/spdystream/commit/ef6121f62c730110bf5ae604a865a8613bfb787f","https://github.com/moby/spdystream","https://github.com/moby/spdystream/releases/tag/v0.5.1"],"sourceUrl":"https://github.com/advisories/GHSA-pc3f-x583-g7j2","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-pc3f-x583-g7j2","identifiers":["GHSA-pc3f-x583-g7j2","CVE-2026-35469","GO-2026-4958"]},"retained":false,"historicalAffected":[]}],"coverage":[]}