# GHSA-36XM-35QQ-795W: Inventory exposes reference to non-Sync data to an arbitrary thread

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2023-09-11
- Modified: 2024-02-10

## Also published as

- [RUSTSEC-2023-0058](https://cve.now/RUSTSEC-2023-0058.md) (RustSec)

## Affected versions

- inventory (crates.io): fixed in 0.2.0

## Description

Affected versions do not enforce a `Sync` bound on the type of caller-provided value held in the plugin registry. References to these values are made accessible to arbitrary threads other than the one that constructed them.

A caller could use this flaw to submit thread-unsafe data into inventory, then access it as a reference simultaneously from multiple threads.

The flaw was corrected by enforcing that data submitted by the caller into inventory is `Sync`.

## References

- https://github.com/dtolnay/inventory/pull/42
- https://github.com/dtolnay/inventory/commit/e1e347d2725b9c9dd4a70b63eb08532ca9687652
- https://github.com/dtolnay/inventory
- https://rustsec.org/advisories/RUSTSEC-2023-0058.html

Page: https://cve.now/GHSA-36XM-35QQ-795W

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
