{"id":"JLSEC-2026-622","aliases":["JLSEC-2026-622","ANT-2026-90M07PW7","ANT-2026-K6WWQH2N","ANT-2026-ZQ6ARSMP"],"related":[],"kind":"vulnerability","state":"published","title":"Predictable WebSocket masking key and handshake nonce in HTTP.jl client","summary":"### Description\n\nThe WebSocket client masking key (`ws_send_frame!`) and the `Sec-WebSocket-Key` handshake nonce (`ws_random_handshake_key`) were generated with `rand(UInt8, n)`, which draws from the task-local Xoshiro256++ PRNG. Xoshiro is not cryptographically secure: its internal state can be recovered from a short run of observed outputs, and every outbound client frame exposes 4 mask bytes on the wire. An on-path observer could therefore recover the RNG state and predict all future masking keys, defeating the RFC 6455 §5.3 anti-cache-poisoning purpose of masking.\n\n### Impact\n\nPredictable masking keys could let an on-path attacker who also supplies payload craft wire bytes that a non-conformant transparent proxy parses and caches (request/response smuggling and cache poisoning).\n\n### Patches\n\nFixed in HTTP.jl v2.4.0. A module-level CSPRNG (`const WS_CSPRNG = Random.RandomDevice()`) now generates both the 4-byte masking key and the 16-byte handshake nonce. The wire format and public API are unchanged.\n\nReported to the JuliaLang security team through Anthropic's Coordinated Vulnerability Disclosure program.","summaryFormat":"markdown","summarySource":"jlsec","descriptions":[{"lang":"en","text":"### Description\n\nThe WebSocket client masking key (`ws_send_frame!`) and the `Sec-WebSocket-Key` handshake nonce (`ws_random_handshake_key`) were generated with `rand(UInt8, n)`, which draws from the task-local Xoshiro256++ PRNG. Xoshiro is not cryptographically secure: its internal state can be recovered from a short run of observed outputs, and every outbound client frame exposes 4 mask bytes on the wire. An on-path observer could therefore recover the RNG state and predict all future masking keys, defeating the RFC 6455 §5.3 anti-cache-poisoning purpose of masking.\n\n### Impact\n\nPredictable masking keys could let an on-path attacker who also supplies payload craft wire bytes that a non-conformant transparent proxy parses and caches (request/response smuggling and cache poisoning).\n\n### Patches\n\nFixed in HTTP.jl v2.4.0. A module-level CSPRNG (`const WS_CSPRNG = Random.RandomDevice()`) now generates both the 4-byte masking key and the 16-byte handshake nonce. The wire format and public API are unchanged.\n\nReported to the JuliaLang security team through Anthropic's Coordinated Vulnerability Disclosure program.","format":"markdown","source":"jlsec"}],"published":"2026-06-23T12:59:32.708Z","modified":"2026-07-21T14:00:04.983Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.4.0"}],"ecosystem":"Julia","package":"HTTP","purl":"pkg:julia/HTTP?uuid=cd3eb016-35fb-5094-929b-558a96fad6f3","source":"jlsec"}],"references":[{"url":"https://github.com/JuliaWeb/HTTP.jl/commit/5763addcbb970c8c7ca170abea56e8125526c99e","tags":["web"],"sources":["jlsec"]},{"url":"https://github.com/JuliaWeb/HTTP.jl/pull/1316","tags":["web"],"sources":["jlsec"]}],"credits":["Julia Security Team in collaboration with Claude and Anthropic Research"],"sources":[{"source":"jlsec","name":"Julia Security Advisories","id":"JLSEC-2026-622","url":"https://osv.dev/vulnerability/JLSEC-2026-622","licence":"CC-BY-4.0","modified":"2026-07-21T14:00:04.983Z"}],"updatedAt":"2026-11-25T22:56:26.180Z"}