Intel

AIKIDO-2026-90728

thread_local is vulnerable to Out-of-Bounds Read

Out-of-Bounds Read Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

57

Medium Risk

This Affects:

RUSTthread_local
0.1.0 - 1.1.9
Fixed in 1.1.10
Are you affected? Scan for Free

TL;DR

ThreadLocal::get_or and get_or_try call an internal insert routine that unconditionally writes the new value into the thread's slot and increments an internal entry counter, even when the create closure has already reentrantly initialized that same slot on the same thread. The extra increment desynchronizes the counter from the number of populated slots, so RawIter::next_mut keeps scanning past the last valid entry and indexes the bucket array out of bounds, and the overwritten slot leaves any reference already returned to the reentrant call dangling. The fix checks whether the slot is already initialized before writing and returns the existing value instead of overwriting it.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you call get_or or get_or_try with a closure that reentrantly calls back into the same ThreadLocal on the same thread.

Background info

thread_local is vulnerable to Out-of-Bounds Read in versions 0.1.0 - 1.1.9.

How to fix this

Upgrade the thread_local library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform