A race condition in kcl-lib can result in a use-after-free when accessing environments concurrently. During Vec reallocation, the previous buffer containing Box pointers is freed and replaced. A concurrent get_env operation that has already loaded a pointer to the old buffer may subsequently index into freed memory and retrieve a stale or corrupted Pin<Box>.
{
"cwe_ids": [
"CWE-362",
"CWE-416"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-20T18:34:11Z",
"nvd_published_at": null,
"severity": "MODERATE"
}