# CVE-2019-16137: RUSTSEC-2019-0013 - Wrong memory orderings in RwLock potentially violates mutual exclusion

Source: https://junglewise.ai/threats/cve-2019-16137-wrong-memory-orderings-violates-mutual-exclusion-in-spin  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-08-27  
License: CC BY 4.0 with a link back

CVE-2019-16137 · Severity: low · CVSS 3.1 · Published 2019-08-27

Wrong memory orderings in RwLock potentially violates mutual exclusion

Technologies: [spin (crates.io)](https://junglewise.ai/threats/technologies/crates-io-spin). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2019-16137 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2019-16137 being exploited in the wild.

**How severe is CVE-2019-16137?** Low severity, with a CVSS score of 3.1, published 27 August 2019.

**Which products and versions are affected?** spin (crates.io) SEMVER:introduced=0,fixed=0.5.2, SEMVER:introduced=0.0.0-0,fixed=0.5.2.

**Is there a fix for CVE-2019-16137?** Yes. spin (crates.io): upgrade to 0.5.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2019-16137?** Check whether you run spin (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- spin (crates.io): upgrade to 0.5.2 or later

  ```sh
  cargo update -p spin
  ```


## Affected products

- spin (crates.io) SEMVER:introduced=0,fixed=0.5.2, SEMVER:introduced=0.0.0-0,fixed=0.5.2

## Identifiers

- CVE-2019-16137
- GHSA-hv7x-f3pv-gpwr
- RUSTSEC-2019-0013

## Related threats

- [spin-rs initialisation failure in `Once::try_call_once` can lead to undefined behaviour for other initialisers](https://junglewise.ai/threats/spin-rs-initialisation-failure-in-once-try-call-once-can-lead-to-c5494bda)
- [RUSTSEC-2023-0031 - Initialisation failure in `Once::try_call_once` can lead to undefined behaviour for other initialisers](https://junglewise.ai/threats/rustsec-2023-0031-initialisation-failure-in-once-try-call-once-can-lead-4fe56ed8)
- [RUSTSEC-2019-0031 - spin is no longer actively maintained](https://junglewise.ai/threats/rustsec-2019-0031-spin-is-no-longer-actively-maintained-aa81c479)
