# CVE-2026-29022: dr_libs dr_wav.h heap buffer overflow in drwav__read_smpl_to_metadata_obj

Source: https://junglewise.ai/threats/cve-2026-29022-dr-libs-dr-wav-h-heap-buffer-overflow-in-drwav-read-smpl-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-03. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-29022 · Severity: high · CVSS 7.3 · Published 2026-03-03

dr_wav is a popular C library used by developers to decode and process WAV audio files in various applications. A security flaw in how the library handles metadata allows a specially crafted audio file to corrupt the computer's memory. If a user opens a malicious WAV file with an application using this library, it could lead to a program crash or potentially allow an attacker to take control of the system.

Technologies: [Mackron Dr Libs](https://junglewise.ai/threats/technologies/dr-libs). Vendors: [Mackron](https://junglewise.ai/threats/vendors/mackron).

## Quick answers

**Is CVE-2026-29022 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-29022 being exploited in the wild.

**How severe is CVE-2026-29022?** High severity, with a CVSS score of 7.3, published 3 March 2026.

**Which products and versions are affected?** Mackron Dr Wav <= 0.14.4.

**Is there a fix for CVE-2026-29022?** A patch was published on 2026-03-03: Fixed in commit 8a7258c / version 0.14.5 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-29022 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-29022?** Check whether you run Mackron Dr Libs or Mackron Dr Wav at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A heap-based buffer overflow exists in dr_wav.h within the drwav__read_smpl_to_metadata_obj() function. The vulnerability stems from a logic mismatch in a two-pass metadata parser: pass 1 validates the 'sampleLoopCount' field to determine allocation size, but pass 2 processes 'smpl' chunks unconditionally. By providing a crafted WAV file where these passes disagree, an attacker can trigger an out-of-bounds write of 36 bytes of controlled data. This is reachable via any drwav_init_*_with_metadata() call. The issue was fixed in commit 8a7258c (released as version 0.14.5).

## Affected products

- dr_libs (mackron) dr_wav.h <= 0.14.4

## Timeline

- 2026-02-27: disclosed: Reported by Ana Kapulica of Marlink Cyber
- 2026-02-28: advisory
- 2026-03-03: patched: Fixed in commit 8a7258c / version 0.14.5

## References

- [https://github.com/mackron/dr_libs/commit/8a7258cc66b49387ad58cc5b81568982a3560d49](https://github.com/mackron/dr_libs/commit/8a7258cc66b49387ad58cc5b81568982a3560d49)
- [https://github.com/mackron/dr_libs/issues/296](https://github.com/mackron/dr_libs/issues/296)
- [https://github.com/marlinkcyber/advisories/blob/main/advisories/MCSAID-2026-001-dr-libs-heap-overflow.md](https://github.com/marlinkcyber/advisories/blob/main/advisories/MCSAID-2026-001-dr-libs-heap-overflow.md)
- [https://www.vulncheck.com/advisories/mackron-dr-libs-heap-buffer-overflow-via-wav-file](https://www.vulncheck.com/advisories/mackron-dr-libs-heap-buffer-overflow-via-wav-file)

## Related threats

- [dr_libs dr_wav out-of-bounds write in cue metadata parsing](https://junglewise.ai/threats/cve-2026-11316-a-out-of-bounds-write-vulnerability-exists-in-the-dr-wav-drwav)
- [dr_libs dr_mp3 out-of-bounds read in frame parsing](https://junglewise.ai/threats/cve-2026-11315-a-out-of-bounds-read-vulnerability-exists-in-the-dr-mp3-drmp3)
- [Mackron miniaudio heap out-of-bounds read in WAV BEXT parser](https://junglewise.ai/threats/cve-2026-32837-mackron-miniaudio-heap-out-of-bounds-read-in-wav-bext-parser)
- [mackron dr_libs uncontrolled memory allocation in dr_flac.h](https://junglewise.ai/threats/cve-2026-32836-mackron-dr-libs-uncontrolled-memory-allocation-in-dr-flac-h)
