Skip to content

Potential DoS Vector in gorilla/websocket <= v1.4.0

High
elithrar published GHSA-jf24-p9p9-4rjh Aug 25, 2019 · 1 comment

Package

gomod gorilla/websocket (Go)

Affected versions

1.4.0

Patched versions

1.4.1

Description

Impact

⚠️ A potential denial-of-service (DoS) vector that can cause an integer overflow in the presence of malicious WebSocket frames was reported in gorilla/websocket versions <= v1.4.0. This could allow an attacker to consume excessive amounts of memory on the server by bypassing read limits, and potentially cause the server to go out-of-memory (OOM).

Fix

👷 A fix (see 5b740c2) adds checks against the remaining bytes on a connection, as well as a test to prevent regression.

We recommend users upgrade the version of gorilla/websocket in-use to >= v1.4.1 and ensure any dependency manifests (go.mod, Gopkg.toml, etc.) pin to the fixed version.

Credit

Credit to Max Justicz (https://justi.cz/) for discovering and reporting this, as well as providing a robust PoC and review.

Severity

High

CVE ID

No known CVE

Weaknesses

No CWEs

Credits