GHSA-pc3f-x583-g7j2
GHSA-pc3f-x583-g7j2 is a CWE-770 vulnerability in github.com/moby/spdystream. O3 Security confirms whether GHSA-pc3f-x583-g7j2 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
SpdyStream: DOS on CRI
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
github.com/moby/spdystreamReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
- SETTINGS entry count -- The SETTINGS frame reader reads a 32-bit
numSettingsfrom the payload and allocates a slice of that size without checking it against the declared frame length. An attacker can setnumSettingsto a value far exceeding the actual payload, triggering a large allocation before any setting data is read. - Header count --
parseHeaderValueBlockreads a 32-bitnumHeadersfrom the decompressed header block and allocates anhttp.Headermap of that size with no upper bound. - 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
numSettingsis consistent with the declared frame length (numSettings <= (length-4)/8) before allocating. - Header count limit --
parseHeaderValueBlockenforces 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.Connwhen it encounters anInvalidControlFrameerror, 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
NewConnectionWithOptionsor the lower-levelspdy.NewFramerWithOptionswith functional options:WithMaxControlFramePayloadSize,WithMaxHeaderFieldSize, andWithMaxHeaderCount.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/moby/spdystream | all versions | 0.5.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/moby/spdystream. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/moby/spdystream to 0.5.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pc3f-x583-g7j2 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-pc3f-x583-g7j2 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-pc3f-x583-g7j2. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-pc3f-x583-g7j2 in your dependencies?
O3 detects GHSA-pc3f-x583-g7j2 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.