{"answers":{"affected":"1 open source package ship an affected version, including wasapi.","exploited":"There is no known exploitation of RUSTSEC-2026-0332 in the wild and no public exploit code.","fix":"Upgrade wasapi to 0.25.0 or later.","what":"RUSTSEC-2026-0332 is a memory corruption vulnerability in wasapi, published on 8 Sep 2026."},"fix_prompt":"Check this codebase for RUSTSEC-2026-0332 and fix it if it is affected.\n\nWhat it is: RUSTSEC-2026-0332 is a memory corruption vulnerability in wasapi, published on 8 Sep 2026. \nExploitation: There is no known exploitation of RUSTSEC-2026-0332 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- wasapi (crates.io): affected from 0.20.0; fixed in 0.25.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/RUSTSEC-2026-0332/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0332/index.md)","id":"RUSTSEC-2026-0332","markdown":"https://insights.sbomify.com/RUSTSEC-2026-0332/index.md","name":"RUSTSEC-2026-0332","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust audio library","requires_auth":"none","summary":"A Rust library allows out-of-bounds memory reads when parsing specific audio format headers, potentially leaking sensitive data.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"`WaveFormat::parse` is a safe function that takes a `\u0026WAVEFORMATEX`, which is\nonly valid for reads of `size_of::\u003cWAVEFORMATEX\u003e()` (18) bytes. When the header\nhas `wFormatTag == WAVE_FORMAT_EXTENSIBLE` and `cbSize \u003e= 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(\u0026header);\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 `\u0026fmt`. 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::\u003cWAVEFORMATEX\u003e() + cbSize` bytes. `WaveFormat::parse_from_blob_bytes`\n(available since 0.23.0) is the safe alternative and checks the slice length\nagainst `cbSize`.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"`WaveFormat::parse` reads past the end of a `\u0026WAVEFORMATEX`","id":"RUSTSEC-2026-0332","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["0.25.0"],"introduced":["0.20.0"],"last_affected":[],"package":"wasapi","purl":"pkg:cargo/wasapi","source":"RUSTSEC-2026-0332"}],"products":null,"published":"2026-09-08","related":[],"sources":[{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A Rust library allows out-of-bounds memory reads when parsing specific audio format headers, potentially leaking sensitive data.","url":"https://insights.sbomify.com/RUSTSEC-2026-0332/"}