Miggo Logo

CVE-2020-36435: Data race in ruspiro-singleton

8.1

CVSS Score
3.1

Basic Information

EPSS Score
0.55836%
Published
8/25/2021
Updated
1/27/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
ruspiro-singletonrust< 0.4.10.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper trait implementations for Sync and Send in the Singleton struct. The original code implemented these traits unconditionally (without T: Sync/Send bounds), violating Rust's thread safety requirements. This allowed interior mutable types like Cell to be stored in singletons, enabling data races in concurrent access scenarios. The commit diff clearly shows these were the only modified trait implementations, and the CVE description explicitly identifies them as the flawed components.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

`Sin*l*ton<T>` is m**nt to ** * st*ti* o*j**t t**t **n ** initi*liz** l*zily. In or**r to s*tis*y t** r*quir*m*nt t**t `st*ti*` it*ms must impl*m*nt `Syn*`, `Sin*l*ton` impl*m*nt** *ot* `Syn*` *n* `S*n*` un*on*ition*lly. T*is *llows *or * *u* w**r*

Reasoning

T** vuln*r**ility st*ms *rom improp*r tr*it impl*m*nt*tions *or Syn* *n* S*n* in t** Sin*l*ton stru*t. T** ori*in*l *o** impl*m*nt** t**s* tr*its un*on*ition*lly (wit*out T: `Syn*`/`S*n*` *oun*s), viol*tin* Rust's t*r*** s***ty r*quir*m*nts. T*is *ll