once_cell is vulnerable to Use of Uninitialized Resource
48
Medium Risk
Affected versions of this package are affected by a memory safety vulnerability in OnceCell::wait when the parking_lot feature is enabled. Under certain race conditions where one thread calls wait() while another thread attempts initialization using get_or_try_init, a panic during initialization may cause wait() to return even though initialization did not complete. As a result, the waiting thread may observe the cell as initialized while it actually contains uninitialized memory, leading to undefined behavior. The issue is addressed by correcting the synchronization logic to ensure wait() only returns after successful initialization.
You are affected if you are using a version that falls within the vulnerable range.
once_cell is vulnerable to Use of Uninitialized Resource in versions 1.12.0 - 1.21.3.
Upgrade the once_cell library to the patch version
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant