🛡️ GHSA-8mj7-wxmc-f424 — neon
Description
Use after free in Neon external buffers
Neon provides functionality for creating JavaScript ArrayBuffer (and the Buffer subtype) instances backed by bytes allocated outside of V8/Node. The [JsArrayBuffer::external](https://docs.rs/neon/0.10.0/neon/types/struct.JsArrayBuffer.html#method.external) and [JsBuffer::external](https://docs.rs/neon/0.10.0/neon/types/struct.JsBuffer.html#method.external) did not require T: 'static prior to Neon 0.10.1. This allowed creating an externally backed buffer from types that may be freed while they are still referenced by a JavaScript ArrayBuffer.
The following example demonstrates use after free. It compiles on versions <0.10.1 and fails to compile afterward.
```rust
pub fn soundness_hole(mut cx: FunctionContext) -> JsResult<JsArrayBuffer> {
let mut data = vec![0u8, 1, 2, 3];
// Creating an external from &mut [u8] instead of Vec<u8> since there is a blanket impl
// of AsMut<T> for &mut T
let buf = JsArrayBuffer::external(&mut cx, data.as_mut_slice());
// buf is still holding a reference to data!
drop(data);
Ok(buf)
}
```
Affected software
GHSA-8mj7-wxmc-f424 is recorded against 1 package.
- neon
Timeline and source
Published on 17 June 2022 and last revised on 8 November 2023. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| neon | — | — |
References
Similar Threats
- Unknown MAL-2026-10537
- Unknown MAL-2026-10089
- Unknown MAL-2026-6793
- Unknown openSUSE-SU-2026:20963-1
- Unknown CGA-3vc3-x52g-9h99
Site Security Check
Is neon part of your stack?
GHSA-8mj7-wxmc-f424 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.