CVE-2025-14569
Executive Summary
CVE-2025-14569 is a use-after-free vulnerability discovered in the ggml-org/whisper.cpp project, specifically in the read_audio_data function within /whisper.cpp/examples/common-whisper.cpp. The flaw affects versions up to and including 1.8.2. An attacker with local access can trigger a use-after-free condition, potentially leading to a denial of service or arbitrary code execution. The exploit has been publicly disclosed, and the vendor has not yet responded or released a patch. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the public availability of the exploit increases the risk for targeted attacks.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the whisper.cpp project, which is distributed as source code on GitHub and may be integrated into various applications via package managers or direct inclusion. Users who have integrated whisper.cpp into their software supply chain should assess their exposure and apply mitigations immediately.
CVSS Breakdown & Threat Level
- CVSS Score: 5.3 (Medium)
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack Vector: Local (AV:L) – The attacker must have local access to the system.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: None (C:N) – No data exposure.
- Integrity Impact: None (I:N) – No data modification.
- Availability Impact: Low (A:L) – Potential for denial of service or limited impact on availability.
Threat Level: Medium. The local attack vector reduces the overall risk, but the public exploit and lack of patch make it a credible threat for environments where untrusted users have local access.
Deep Dive & Mechanics
The vulnerability resides in the read_audio_data function in common-whisper.cpp. This function is responsible for reading audio data from a file into memory for processing by the Whisper model. The use-after-free occurs when memory is freed but a pointer to that memory is still used, leading to undefined behavior.
Root Cause: The function likely frees a buffer (e.g., after reading audio data) but continues to use a pointer to that buffer in subsequent operations. This can happen if the code does not properly nullify the pointer after freeing or if there is a race condition between freeing and using the memory.
Attack Vector: An attacker with local access can craft a malicious audio file that triggers the use-after-free. By controlling the freed memory (e.g., via heap spraying), the attacker may achieve code execution or cause a crash.
Impact: Successful exploitation can lead to a denial of service (application crash) or, in more sophisticated attacks, arbitrary code execution with the privileges of the user running the application.
Vulnerable vs. Patched Code
Since no official patch has been released, the following is a hypothetical fix based on common use-after-free remediation.
Vulnerable Code (Conceptual):
void read_audio_data(const char* filename, float*& data, int& length) {
// ... read audio data into buffer ...
data = (float*)malloc(size);
// ... fill data ...
free(data); // Memory freed
// data pointer is now dangling
// Subsequent use of data leads to use-after-free
process_audio(data, length); // Use after free
}
Patched Code (Hypothetical):
void read_audio_data(const char* filename, float*& data, int& length) {
// ... read audio data into buffer ...
data = (float*)malloc(size);
// ... fill data ...
// Do not free data here; let caller manage memory
// Or set data to NULL after freeing
// free(data);
// data = NULL;
process_audio(data, length); // Safe if data is valid
}
Note: The actual fix would require careful review of the codebase to ensure all dangling pointers are eliminated.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Local access to a system running
whisper.cppversion <= 1.8.2. - Ability to provide a crafted audio file as input.
Exploit Steps:
- Craft Malicious Audio File: Create a specially crafted WAV or other audio file that triggers the use-after-free in
read_audio_data. The file should cause the function to free a buffer and then use it. - Heap Spray (Optional): To achieve code execution, spray the heap with controlled data to overwrite the freed memory with a malicious payload.
- Trigger the Vulnerability: Run
whisper.cppwith the crafted audio file as input. - Achieve Impact: Depending on the exploit, this may cause a crash (DoS) or execute arbitrary code.
Example Command:
./main -f malicious.wav
Note: No public exploit code is available in Exploit-DB at this time.
Blue Team (Defense)
Detection:
- Monitor for crashes or abnormal terminations of
whisper.cppprocesses. - Use memory analysis tools (e.g., Valgrind, AddressSanitizer) to detect use-after-free during testing.
- Implement file integrity monitoring for audio files processed by the application.
Mitigation:
- Restrict local access to systems running
whisper.cpp. - Use sandboxing or containerization to limit the impact of exploitation.
- Apply memory safety protections (e.g., ASLR, DEP) to make exploitation harder.
- Monitor for public patches and apply them as soon as available.
Indicators of Compromise (IOCs)
- File Hashes (Malicious Audio Files): (None provided; generate during analysis)
- Process Anomalies:
whisper.cppprocess crashes or unexpected memory access violations. - Log Entries: Application logs showing segmentation faults or memory errors.
- Network Traffic: None expected (local vulnerability).
Detection Engineering
YARA Rule
rule CVE_2025_14569_UseAfterFree {
meta:
description = "Detects use-after-free in whisper.cpp read_audio_data"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-14569"
strings:
$s1 = "read_audio_data" ascii wide nocase
$s2 = "free(data)" ascii wide nocase
$s3 = "process_audio" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: CVE-2025-14569 Use-After-Free in whisper.cpp
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of use-after-free in whisper.cpp
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/whisper.cpp'
CommandLine|contains: '.wav'
condition: selection
falsepositives:
- Legitimate audio processing
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-14569 Potential Use-After-Free in whisper.cpp"; flow:to_server; content:"|00 00 00 00|"; depth:4; sid:1000001; rev:1;)
Note: Suricata rule is generic; network-based detection is unlikely for this local vulnerability.
Remediation & Mitigation
Immediate Actions:
- Restrict Local Access: Limit user access to systems running
whisper.cppto trusted users only. - Monitor for Updates: Watch the official GitHub repository for patches or workarounds.
- Apply Memory Protections: Enable ASLR, DEP, and use compiler flags like
-fstack-protector-strongwhen building from source.
Long-Term Fix:
- The vendor must release a patch that properly manages memory in
read_audio_data, ensuring no use-after-free occurs. - Consider using safer memory management practices, such as smart pointers in C++ or Rust.
Workaround:
- If possible, avoid processing untrusted audio files with
whisper.cppuntil a patch is available.
Valters IT