LowGO-2020-0019CVE-2020-27813GHSA-3xh2-74w9-5vxmGHSA-jf24-p9p9-4rjh

Integer overflow in github.com/gorilla/websocket

Published 14 Apr 2021 · Updated 20 May 2024

Is your project on an affected github.com/gorilla/websocket?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<1.4.1
Fixed in
1.4.1
Update to the fixed version for your release line, for example:go get github.com/gorilla/websocket@v1.4.1

Details

An attacker can craft malicious WebSocket frames that cause an integer overflow in a variable which tracks the number of bytes remaining. This may cause the server or client to get stuck attempting to read frames in a loop, which can be used as a denial of service vector.

Is GO-2020-0019 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/gorilla/websocket, and gives you the command that fixes it.

More advisories for github.com/gorilla/websocket

  • LowGO-2026-6278Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key in github.com/gorilla/websocket · 25 Aug 2026
  • MediumGHSA-w67g-5rqw-f597Gorilla WebSocket Uses Cryptographically Weak PRNG for WebSocket Mask Key · 24 Aug 2026
github.com/gorilla/websocket security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.