# GHSA-4xr6-hc3h-f6jq: Unbounded allocation from peer-declared frame length in github.com/gobwas/ws

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-11-23T20:02:25.000Z
- Modified: 2026-11-23T20:30:11.841Z
- Also known as: GO-2026-6940

## Description

ws.ReadFrame, ws.MustReadFrame, and the wsutil message readers allocate a buffer of the payload length declared in the frame header before reading any payload bytes. A remote unauthenticated peer can send a frame header declaring a large payload length and cause an out-of-memory crash.

(As written by Go Vulnerability Database.)

## Affected

- github.com/gobwas/ws (Go): before 1.5.0

## References

- <https://github.com/gobwas/ws/security/advisories/GHSA-4xr6-hc3h-f6jq> (advisory)
- <https://github.com/gobwas/ws/commit/6b485812604c20a7174f3d68a64379121bcddfe2> (fix)
- <https://github.com/gobwas/ws/pull/229> (fix)
- <https://github.com/gobwas/ws/issues/223> (report)

## Sources

- Go Vulnerability Database: [GO-2026-6940](https://pkg.go.dev/vuln/GO-2026-6940), CC-BY-4.0, modified 2026-11-23

---

Page: https://cve.day/GHSA-4xr6-hc3h-f6jq · Whole record: https://cve.day/GHSA-4xr6-hc3h-f6jq.json · Rebuilt by cve.day 2026-11-25T22:56:25.597Z
