{"id":"RUSTSEC-2026-0332","revision":null,"records":[{"revision":"10a35c66f2d145b386ab3789f1307266","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0332","aliases":[],"title":"`WaveFormat::parse` reads past the end of a `&WAVEFORMATEX`","description":"`WaveFormat::parse` is a safe function that takes a `&WAVEFORMATEX`, which is\nonly valid for reads of `size_of::<WAVEFORMATEX>()` (18) bytes. When the header\nhas `wFormatTag == WAVE_FORMAT_EXTENSIBLE` and `cbSize >= 22`, the function\nreinterprets the reference as a `WAVEFORMATEXTENSIBLE` and reads 40 bytes.\nNothing in the signature guarantees that the header sits at the start of a\nlarger buffer, so safe code can trigger an out-of-bounds read:\n\n```rust\nuse wasapi::WaveFormat;\nuse windows::Win32::Media::Audio::WAVEFORMATEX;\nuse windows::Win32::Media::KernelStreaming::WAVE_FORMAT_EXTENSIBLE;\n\nlet header = WAVEFORMATEX {\n    wFormatTag: WAVE_FORMAT_EXTENSIBLE as u16,\n    nChannels: 2,\n    nSamplesPerSec: 48000,\n    nAvgBytesPerSec: 384000,\n    nBlockAlign: 8,\n    wBitsPerSample: 32,\n    cbSize: 22,\n};\n// Reads 22 bytes past the end of `header`.\nlet _ = WaveFormat::parse(&header);\n```\n\nA more likely way to hit this is to copy the header out of a format pointer\nreturned by WASAPI (`let fmt = unsafe { *ptr };`) and pass `&fmt`. The copy\nkeeps `cbSize`, but not the 22 bytes that follow it. The bytes read past the\nend are returned as the channel mask and subformat of the parsed format.\n\nThe flaw was corrected in commit `2562db7`, released in 0.25.0. `parse` is now\nan `unsafe fn` that takes a `*const WAVEFORMATEX`, and the caller must\nguarantee that the pointer is valid for reads of\n`size_of::<WAVEFORMATEX>() + cbSize` bytes. `WaveFormat::parse_from_blob_bytes`\n(available since 0.23.0) is the safe alternative and checks the slice length\nagainst `cbSize`.","state":0,"publishedAt":"2026-09-08T12:00:00+00:00","modifiedAt":"2026-10-07T14:45:03.0581048+00:00","affected":[{"ecosystem":"crates.io","name":"wasapi","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.20.0"},{"kind":"fixed","version":"0.25.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/wasapi","https://rustsec.org/advisories/RUSTSEC-2026-0332.html","https://github.com/HEnquist/wasapi-rs/issues/65","https://github.com/HEnquist/wasapi-rs/pull/64"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0332","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0332","identifiers":["RUSTSEC-2026-0332"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-11T11:57:48.1935565+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-11T11:57:48.1935565+00:00","lastSuccessAt":"2026-11-11T11:57:48.3425698+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:48.3425702+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-de3b77103708811b6494d2ff7c979037d73ae579742cd1649a5c765137ae5083-08810285716c151004c67847239e44305919603a6514bf8f71e8742fea5ea4c7","complete":true,"records":424036,"lastAttemptAt":"2026-11-11T11:57:47.1356939+00:00","lastSuccessAt":"2026-11-11T11:57:47.0236846+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:47.1356939+00:00","snapshotPublishedAt":"2026-11-11T11:23:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-99bdca71b3604150bbac354a4a9d8a89","complete":false,"records":13758,"lastAttemptAt":"2026-11-11T12:09:48.959833+00:00","lastSuccessAt":"2026-11-11T12:09:48.955+00:00","error":null,"lastVerifiedAt":"2026-11-11T12:09:48.955+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13489,"expectedIdentifiers":13812,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-11T11:57:48.1935565+00:00","complete":true,"records":1097,"lastAttemptAt":"2026-11-11T11:57:48.1935565+00:00","lastSuccessAt":"2026-11-11T11:57:48.3433334+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:48.3433335+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-622dd4c770014d0cabbdd0941fabd46f","complete":true,"records":13752,"lastAttemptAt":"2026-11-11T11:57:48.9429139+00:00","lastSuccessAt":"2026-11-11T10:57:38.856+00:00","error":null,"lastVerifiedAt":"2026-11-11T10:57:38.856+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13812,"expectedIdentifiers":13812,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-3562b6c78fd1bd0f0b55daf66a0926ae24f65e462df7f6d928caad458fc696bf","complete":true,"records":9947,"lastAttemptAt":"2026-11-11T11:57:47.7728063+00:00","lastSuccessAt":"2026-11-11T04:27:43.6877707+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:47.7728063+00:00","snapshotPublishedAt":"2026-11-11T03:32:46+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-456002455e0ab94bb92c95476d4e6d175c104cd594749982afd96c893728ecbc","complete":true,"records":2010,"lastAttemptAt":"2026-11-11T11:57:47.2778993+00:00","lastSuccessAt":"2026-11-11T02:36:58.1276999+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:47.2778993+00:00","snapshotPublishedAt":"2026-11-11T01:17:51+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-b178858a6ba5f2e20262964fa29d9573839d1b8b735abe524cc7d061ebde5c37","complete":true,"records":3088,"lastAttemptAt":"2026-11-11T11:57:48.1551807+00:00","lastSuccessAt":"2026-11-11T10:57:37.4490966+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:48.1551807+00:00","snapshotPublishedAt":"2026-11-11T10:48:28+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-085e065fc9050ae18408f7e722c39653aeb186872334d7b3ec1fcafb7ed43d25","complete":true,"records":231665,"lastAttemptAt":"2026-11-11T11:57:47.665155+00:00","lastSuccessAt":"2026-11-11T08:27:45.2700102+00:00","error":null,"lastVerifiedAt":"2026-11-11T11:57:47.665155+00:00","snapshotPublishedAt":"2026-11-11T07:32:59+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}