UnratedFix available
`OutBuffer::around_pos` exposes uninitialized memory
Type: advisorySources: OSV
`OutBuffer::around_pos` accepted a position past the initialized length of a `Vec`. The next streaming call then marked everything before the position as initialized, so safe code could read stale heap memory between the vector's previous length and that position. The flaw was corrected by zero-filling that gap.
- Products
- zstd-safe
- Affected versions
- Not specified
- Fixed versions
- 8.2.0
- CVEs
- Not specified
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 14:47 UTC · Revision 1
Source evidence
`OutBuffer::around_pos` exposes uninitialized memory
core-osv · Original sourcePublished 16 Oct 2026, 12:00 UTC
`OutBuffer::around_pos` accepted a position past the initialized length of a `Vec`. The next streaming call then marked everything before the position as initialized, so safe code could read stale heap memory between the vector's previous length and that position. The flaw was corrected by zero-filling that gap.
osv:RUSTSEC-2026-0397
zstd-safe
Fixed versions: 8.2.0
Complete source record
{
"id": "2c3b6aa8828bcf540226d57d07010cc9e5cf0678bb282564c116cfbca001f87f",
"url": "https://osv.dev/vulnerability/RUSTSEC-2026-0397",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "`OutBuffer::around_pos` exposes uninitialized memory",
"summary": "`OutBuffer::around_pos` accepted a position past the initialized length of a `Vec`. The next streaming call then marked everything before the position as initialized, so safe code could read stale heap memory between the vector's previous length and that position. The flaw was corrected by zero-filling that gap.",
"evidence": "osv:RUSTSEC-2026-0397",
"products": [
{
"name": {
"value": "zstd-safe",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "8.2.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "RUSTSEC-2026-0397",
"aliases": [
"RUSTSEC-2026-0397"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "8.2.0"
}
]
}
],
"package": {
"name": "zstd-safe",
"purl": "pkg:cargo/zstd-safe",
"ecosystem": "crates.io"
},
"database_specific": {
"cvss": null,
"source": "https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0397.json",
"categories": [
"memory-exposure"
],
"informational": "unsound"
},
"ecosystem_specific": {
"affects": {
"os": [],
"arch": [],
"functions": [
"zstd_safe::OutBuffer::around_pos"
]
},
"affected_functions": null
}
}
],
"modified": "2026-10-26T14:00:05.089587004Z",
"provider": "osv",
"references": [
"https://crates.io/crates/zstd-safe",
"https://rustsec.org/advisories/RUSTSEC-2026-0397.html",
"https://github.com/gyscos/zstd-rs/commit/5827de2459b8ac430e87e860f00c7f3c13023833",
"https://github.com/gyscos/zstd-rs/pull/384"
],
"provider_metadata": {
"license": "CC0-1.0"
}
},
"related_cves": [],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 454190,
"published_at": "2026-10-16T12:00:00+00:00"
}