CVE-2021-34085

9.8 CRITICAL

📋 TL;DR

This vulnerability is a read access violation in the III_dequantize_sample function of mp3gain's mpglibDBL library. It allows remote attackers to cause denial of service (application crash) or potentially execute arbitrary code by exploiting improper memory access when processing malicious MP3 files. Anyone using mp3gain versions through 1.5.2-r2 is affected.

💻 Affected Systems

Products:
  • mp3gain
Versions: through 1.5.2-r2
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of affected versions are vulnerable when processing MP3 files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Application crash causing denial of service for MP3 processing functionality.

🟢

If Mitigated

Application crash contained within sandboxed environment with no privilege escalation.

🌐 Internet-Facing: MEDIUM - Requires user to process malicious MP3 files, but could be exploited via web uploads or email attachments.
🏢 Internal Only: LOW - Typically requires user interaction to process malicious files, limited to affected application scope.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires user to process a specially crafted MP3 file. The vulnerability is in a widely used library component.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.5.2-r3 and later

Vendor Advisory: https://sourceforge.net/p/mp3gain/news/

Restart Required: No

Instructions:

1. Download latest version from official source. 2. Uninstall old version. 3. Install new version. 4. Verify installation with version check.

🔧 Temporary Workarounds

Disable MP3 processing

all

Temporarily disable or restrict MP3 file processing functionality

Sandbox application

linux

Run mp3gain in isolated container or sandbox environment

docker run --rm -v $(pwd):/data alpine/mp3gain:latest

🧯 If You Can't Patch

  • Implement strict file upload validation to block potentially malicious MP3 files
  • Run mp3gain with minimal privileges and in isolated environments

🔍 How to Verify

Check if Vulnerable:

Check mp3gain version: mp3gain -v or dpkg -l | grep mp3gain

Check Version:

mp3gain -v

Verify Fix Applied:

Verify version is 1.5.2-r3 or higher: mp3gain -v

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation fault
  • Memory access violation errors
  • Unexpected termination of mp3gain process

Network Indicators:

  • Unusual MP3 file uploads to systems
  • Multiple failed MP3 processing attempts

SIEM Query:

process_name="mp3gain" AND (event_type="crash" OR exit_code="139")

🔗 References

📤 Share & Export