GHSA-mc9m-6fm9-pghc — kcl-lib
GHSA-mc9m-6fm9-pghc is a security vulnerability in kcl-lib. A fix is available for kcl-lib — see the affected versions and patch details below.
Zoo Design Studio: Memory-corruption in memory handling of lib-kcl
Real-World Exposure
kcl-lib🐍zoo-kclReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io, PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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<Environment>>.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | kcl-lib | all versions | 0.2.153cargo update -p kcl-lib --precise 0.2.153 |
| 🐍PyPI | zoo-kcl | all versions | 0.3.153pip install --upgrade 'zoo-kcl==0.3.153' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for kcl-lib, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update kcl-lib to 0.2.153 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mc9m-6fm9-pghc is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Frequently Asked Questions
Is GHSA-mc9m-6fm9-pghc in your dependencies?
Find it across crates.io, PyPI, including transitive dependencies.