Skip to main content

dr_libs CVE-2026-71261

| EUVDEUVD-2026-53346 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-08-05 TuranSec GHSA-cfw7-vmp5-wg69
7.8
CVSS 3.1 · Vendor: TuranSec
Share

Severity by source

Vendor (TuranSec) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI
7.8 HIGH

File-based delivery requires local access and user interaction; no privileges needed; heap overflow yields full CIA impact within application scope.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
HIGH
qualitative

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Aug 05, 2026 - 13:31 vuln.today
CVE Published
Aug 05, 2026 - 12:26 cve.org
HIGH 7.8

DescriptionCVE.org

dr_libs dr_wav.h (all versions through current master) contains an integer overflow in W64 CUE chunk metadata parsing. In drwav__metadata_process_chunk(), a stage-1 capacity estimate truncates the 64-bit W64 chunk sizeInBytes to size_t before dividing by DRWAV_CUE_POINT_BYTES; on 32-bit builds this truncation causes the pre-allocated extra metadata capacity to be computed incorrectly. The subsequent read in drwav__read_cue_to_metadata_obj() computes the actual cue point count and allocation size using the full-precision, attacker-controlled cuePointCount field without cross-checking it against the stage-1 capacity estimate, and the only bounds enforcement on the resulting memory region (drwav__metadata_get_memory()) is a DRWAV_ASSERT, which compiles to a no-op under -DNDEBUG (the default for release builds). A crafted W64 WAV file can therefore cause a heap buffer overflow in any 32-bit application parsing untrusted WAV metadata.

AnalysisAI

Heap buffer overflow in dr_libs dr_wav.h enables arbitrary code execution in 32-bit applications that parse untrusted W64 WAV files containing CUE chunk metadata. The flaw stems from a two-stage allocation mismatch: stage-1 capacity estimation silently truncates a 64-bit W64 chunk size to 32-bit size_t, under-allocating heap space, while stage-2 writes using the full attacker-controlled cuePointCount field without validating against that flawed estimate. The sole runtime guard (DRWAV_ASSERT) is compiled out under -DNDEBUG, the default for release builds, making exploitation silent in production. No active exploitation is confirmed (not in CISA KEV) and no public exploit code has been identified at time of analysis.

Technical ContextAI

dr_libs is a collection of single-header C audio decoding libraries authored by mackron; dr_wav.h handles both conventional WAV and W64 (Sony Wave 64) format files. W64 extends WAV by using 64-bit chunk size fields to support files larger than 4 GB. The vulnerability (CWE-190: Integer Overflow or Wraparound) lives in the W64 CUE chunk metadata parsing path across two functions. In drwav__metadata_process_chunk(), the library performs a stage-1 capacity pre-estimation by casting the 64-bit sizeInBytes field to size_t and dividing by DRWAV_CUE_POINT_BYTES; on 32-bit platforms where size_t is 4 bytes, the upper 32 bits of sizeInBytes are silently discarded before division, producing a capacity estimate that is far smaller than the actual chunk data warrants. In drwav__read_cue_to_metadata_obj(), the library then reads cuePointCount directly from the file - a fully attacker-controlled field - and derives the actual memory allocation from it without cross-checking against the stage-1 estimate. The function drwav__metadata_get_memory() enforces bounds only via DRWAV_ASSERT, which the C preprocessor strips entirely when -DNDEBUG is defined, as is standard in production release builds. The result is a classic heap buffer overflow driven by the divergence between a corrupted capacity estimate and an attacker-supplied object count. All versions are affected per CPE cpe:2.3:a:mackron:dr_libs:*:*:*:*:*:*:*:*.

RemediationAI

No vendor-released patch has been identified at time of analysis; the references point only to the upstream source repository without a tagged fix commit or release. Developers embedding dr_wav.h should apply specific source-level mitigations immediately: (1) Insert an explicit cast-and-validate guard in drwav__metadata_process_chunk() that confirms sizeInBytes does not exceed SIZE_MAX before truncating to size_t, and abort or return an error if it does - this eliminates the under-allocation at the root. (2) In drwav__read_cue_to_metadata_obj(), cross-check the parsed cuePointCount against the stage-1 capacity estimate before computing the stage-2 allocation, refusing to proceed if they are inconsistent. (3) Replace or supplement DRWAV_ASSERT with an explicit conditional abort that is not stripped by -DNDEBUG, such as a runtime bounds check that returns DRWAV_FALSE on overflow. As a deployment-level control, applications that do not use CUE point metadata can stub or disable that parsing path entirely with no functional cost. Any 32-bit build target processing untrusted WAV input should be considered high priority for these fixes. Monitor https://github.com/mackron/dr_libs for an upstream patch commit.

Vendor StatusVendor

SUSE

Severity: Important

Share

CVE-2026-71261 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy