Miggo Logo

GHSA-58j9-j2fj-v8f4: SurrealDB vulnerable to Uncontrolled CPU Consumption via WebSocket Interface

7.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
1/19/2024
Updated
1/19/2024
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
surrealdbrust< 1.1.01.1.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from tungstenite's HTTP header processing during WebSocket handshakes. The commit diff shows SurrealDB updated from vulnerable tungstenite versions (<0.20.1) where these functions lacked proper header size validation. The original tungstenite issue (#376) specifically identifies the parsing loop in single_round() and try_parse() as the problem area. These functions repeatedly process oversized headers without early rejection, leading to CPU exhaustion. The functions are in the dependency chain through axum/tokio-tungstenite used by SurrealDB's WebSocket implementation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Surr**l** **p*n*s on t** `tun*st*nit*` *n* `tokio-tun*st*nit*` *r*t*s us** *y t** `*xum` *r*t*, w*i** **n*l*s *onn**tions to t** Surr**l** W**So*k*t int*r****. On v*rsions ***or* `*.**.*`, t** `tun*st*nit*` *r*t* pr*s*nt** *n issu* w*i** *llow** t**

Reasoning

T** vuln*r**ility st*ms *rom tun*st*nit*'s *TTP *****r pro**ssin* *urin* W**So*k*t **n*s**k*s. T** *ommit *i** s*ows Surr**l** up**t** *rom vuln*r**l* tun*st*nit* v*rsions (<*.**.*) w**r* t**s* *un*tions l**k** prop*r *****r siz* v*li**tion. T** ori*