CVE-2025-27091
NoneCVSS
—
EPSS
0.7%
Published
Feb 20, 2025
CISA due date
—
Cloudanix analysis
A bug in a popular video handling library can let attackers crash programs or run harmful code by tricking users into opening certain video files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition between SPS memory allocation and subsequent non-IDR NAL unit usage in OpenH264 decoding functions triggers heap overflow when processing crafted bitstreams in both SVC and AVC modes.
Why it matters to the business
Video decoding clients in ecosystems with 98 downstream dependents face crashes or potential arbitrary command execution, disrupting operations and exposing hosts to compromise with no known ransomware campaigns observed.
How an attack unfolds
Attacker crafts malicious H.264 bitstream exploiting the SPS/non-IDR race condition, delivers it in a video file, and tricks the victim into decoding it in an affected OpenH264 client up to version 2.5.0.
How to fix it
Upgrade to OpenH264 2.6.0 or later; for affected packages apply tensorflow (Bitnami) 2.1.4 or cisco/openh264 commit 652bdb7719f30b52b08e506645a7322ff1b2cc6f. No workarounds exist.
How to confirm the fix worked
Confirm installed OpenH264 version is 2.6.0 or newer via library metadata or package manager; reprocess known test vectors post-upgrade to verify absence of overflow.
Typical attack path
- Craft malicious bitstream targeting the race condition
- Embed bitstream in video file and distribute to victim
- Victim processes the video in vulnerable decoder
- Trigger race between SPS allocation and NAL usage
- Exploit resulting heap overflow for crash or code execution
How to detect it
Review application logs for OpenH264 decoder crashes during video processing; inspect heap allocation patterns around SPS and NAL handling in affected versions.
What your security team should do
- Immediately upgrade all OpenH264 instances and dependents to fixed versions
- Scan build pipelines and containers for versions 2.5.0 and earlier
- Monitor video decoding processes for unexpected crashes
- Track EPSS and ecosystem prevalence for prioritization
The record
OpenH264 is a free license codec library which supports H.264 encoding and decoding. A vulnerability in the decoding functions of OpenH264 codec library could allow a remote, unauthenticated attacker to trigger a heap overflow. This vulnerability is due to a race condition between a Sequence Parameter Set (SPS) memory allocation and a subsequent non Instantaneous Decoder Refresh (non-IDR) Network Abstraction Layer (NAL) unit memory usage. An attacker could exploit this vulnerability by crafting a malicious bitstream and tricking a victim user into processing an arbitrary video containing the malicious bistream. An exploit could allow the attacker to cause an unexpected crash in the victim's user decoding client and, possibly, perform arbitrary commands on the victim's host by abusing the heap overflow. This vulnerability affects OpenH264 2.5.0 and earlier releases. Both Scalable Video Coding (SVC) mode and Advanced Video Coding (AVC) mode are affected by this vulnerability. OpenH264 software releases 2.6.0 and later contained the fix for this vulnerability. Users are advised to upgrade. There are no known workarounds for this vulnerability. ### For more information If you have any questions or comments about this advisory: * [Open an issue in cisco/openh264](https://github.com/cisco/openh264/issues) * Email Cisco Open Source Security ([oss-security@cisco.com](mailto:oss-security@cisco.com)) and Cisco PSIRT ([psirt@cisco.com](mailto:psirt@cisco.com)) ### Credits: * **Research:** Octavian Guzu and Andrew Calvano of Meta * **Fix ideation:** Philipp Hancke and Shyam Sadhwani of Meta * **Fix implementation:** Benzheng Zhang (@BenzhengZhang) * **Release engineering:** Benzheng Zhang (@BenzhengZhang)
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | openh264-sys2 | 0.0.0-0 | 0.8.0 |
| Debian:12 | openh264 | 0 | No fix |
| Debian:12 | openh264 | 0 | 2.3.1+dfsg-3+deb12u1 |
| Debian:13 | openh264 | 0 | No fix |
| Debian:14 | openh264 | 0 | 2.5.0+dfsg-2 |