Race Condition Affecting ruspiro-singleton package, versions <0.4.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.24% (63rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Race Condition vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-RUSPIROSINGLETON-1316319
  • published9 Jul 2021
  • disclosed16 Nov 2020
  • creditUnknown

Introduced: 16 Nov 2020

CVE-2020-36435  (opens in a new tab)
CWE-362  (opens in a new tab)

How to fix?

Upgrade ruspiro-singleton to version 0.4.1 or higher.

Overview

ruspiro-singleton is a Singleton lacks bounds on Send and Sync.

Affected versions of this package are vulnerable to Race Condition. Singleton<T> is meant to be a static object that can be initialized lazily. In order to satisfy the requirement that static items must implement Sync, Singleton implemented both Sync and Send unconditionally. This allows for a bug where non-Sync types such as Cell can be used in singletons and cause data races in concurrent programs. The flaw was corrected in commit b0d2bd20e by adding trait bounds, requiring the contaiend type to implement Sync.

References

CVSS Scores

version 3.1