string_cache is vulnerable to Use After Free
56
Medium Risk
Cloning a dynamic Atom incremented the interned entry's atomic reference count with fetch_add and no overflow check. On 32-bit platforms, cloning an atom about 2.1 billion times wraps the count, freeing the intern-table entry while clones still exist and causing a use-after-free. The intern table also stored entries as Box<Entry> that were moved through the global linked list, invalidating raw pointers held by live Atoms under Stacked/Tree Borrows, and from_mutated_str created a mutable slice over uninitialized stack memory. Version 0.11.0 aborts on refcount overflow like Arc, stores entries as NonNull<Entry>, and copies through initialized memory only.
You are affected if you are using a version that falls within the vulnerable range and intern dynamic (non-static) atoms. The reference-count overflow is primarily reachable on 32-bit targets after an extreme number of clones; the intern-table aliasing and uninitialized-memory issues apply on all architectures during ordinary dynamic-atom use.
string_cache is vulnerable to Use After Free in versions 0.1.0 - 0.10.0.
Upgrade the string_cache 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.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.