CVE-2021-3497
High · 7.8CVSS
7.8
EPSS
1.2%
Published
Apr 19, 2021
CISA due date
—
Cloudanix analysis
A flaw in a widely used video handling library lets attackers take over a computer simply by tricking someone into opening a specially made video file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in GStreamer's Matroska demuxer error paths allows an attacker-controlled pointer dereference after memory release, enabling memory corruption that can lead to arbitrary code execution or process crash.
Why it matters to the business
Attackers can gain full control of systems that process untrusted video files, resulting in data theft, ransomware deployment, or lateral movement; the issue affects media pipelines, desktop applications, and any downstream products that embed the library.
How an attack unfolds
An attacker crafts a specially malformed Matroska container that triggers an error path during demuxing; when a victim application using an affected GStreamer version opens the file, the use-after-free is triggered, allowing the attacker to corrupt memory and execute arbitrary code.
How to fix it
Upgrade GStreamer to a version containing commit b5b2e3b9208f1f93bc5b0244d29dfed157d78293 or later (equivalent to 1.18.4+); for GitLab Bitnami deployments upgrade to 14.7.7 or newer. Rebuild and redeploy any applications statically linked against the vulnerable library.
How to confirm the fix worked
Confirm the installed GStreamer shared libraries report a version at or above the fixed commit; run regression tests with known-malformed Matroska samples to verify the error path no longer accesses freed memory.
Typical attack path
- Craft a malformed Matroska file that exercises the vulnerable error path in the demuxer
- Deliver the file to the target via email, download, or shared storage
- Victim opens or previews the file with any application that uses the vulnerable GStreamer version
- Demuxer hits the error path, triggering use-after-free and memory corruption
- Attacker payload executes, establishing persistence or exfiltrating data
How to detect it
Review application and system logs for unexpected crashes or segmentation faults in gst-* or gstreamer processes when Matroska files are processed; correlate with file creation or download events involving .mkv extensions.
What your security team should do
- Immediately inventory all systems and containers that ship or link against GStreamer and schedule upgrades to the fixed versions listed
- Block or sandbox untrusted Matroska file processing until patches are applied
- Add GStreamer version checks to build pipelines and container scanning policies
- Monitor for new public exploits given the age of the disclosure and update EPSS tracking
The record
GStreamer before 1.18.4 might access already-freed memory in error code paths when demuxing certain malformed Matroska files.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | gstreamer1-plugins-good | 0 | 1.16.1-3.el8 |
| AlmaLinux:8 | gstreamer1-plugins-good-gtk | 0 | 1.16.1-3.el8 |
| Alpine:v3.13 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.14 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.15 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.16 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.17 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.18 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.19 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.20 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.21 | gstreamer | 0 | 1.18.4-r0 |
| Alpine:v3.22 | gstreamer | 0 | 1.18.4-r0 |
| Debian:10 | gst-plugins-good1.0 | 0 | 1.14.4-1+deb10u1 |
| Debian:11 | gst-plugins-good1.0 | 0 | 1.18.4-2 |
| Debian:12 | gst-plugins-good1.0 | 0 | 1.18.4-2 |
| Debian:13 | gst-plugins-good1.0 | 0 | 1.18.4-2 |
| Debian:9 | gst-plugins-good1.0 | 0 | 1.10.4-1+deb9u1 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-good | 0 | 0:1.16.1-3.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-good-debuginfo | 0 | 0:1.16.1-3.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-good-debugsource | 0 | 0:1.16.1-3.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-good-gtk | 0 | 0:1.16.1-3.el8 |
| Red Hat:enterprise_linux:8::appstream | gstreamer1-plugins-good-gtk-debuginfo | 0 | 0:1.16.1-3.el8 |
| Rocky Linux:8 | gstreamer1-plugins-good | 0 | 0:1.16.1-3.el8 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP2 | gstreamer-plugins-good | 0 | 1.16.3-3.6.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | gstreamer-plugins-good | 0 | 1.16.3-3.6.1 |
| SUSE:Linux Enterprise Server 12 SP5 | gstreamer-plugins-good | 0 | 1.8.3-16.3.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | gstreamer-plugins-good | 0 | 1.12.5-150000.3.7.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | gstreamer-plugins-good | 0 | 1.8.3-16.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | gstreamer-plugins-good | 0 | 1.12.5-150000.3.7.2 |
| Ubuntu:16.04:LTS | gst-plugins-good1.0 | 0 | 1.8.3-1ubuntu0.5 |
| Ubuntu:18.04:LTS | gst-plugins-good1.0 | 0 | 1.14.5-0ubuntu1~18.04.2 |
| Ubuntu:20.04:LTS | gst-plugins-good1.0 | 0 | 1.16.2-1ubuntu2.1 |
| openSUSE:Leap 15.2 | gstreamer-plugins-good | 0 | 1.16.3-lp152.2.6.1 |
| openSUSE:Leap 15.3 | gstreamer-plugins-good | 0 | 1.16.3-3.6.1 |
Related vulnerabilities
- CVE-2024-47606 GStreamer is a library for constructing graphs of media-handling components. Also affects gstreamer1-plugins-good
- CVE-2024-47613 GStreamer is a library for constructing graphs of media-handling components. Also affects gstreamer1-plugins-good
- CVE-2024-47539 GStreamer is a library for constructing graphs of media-handling components. Also affects gstreamer1-plugins-good
- CVE-2024-47540 GStreamer is a library for constructing graphs of media-handling components. Also affects gstreamer1-plugins-good
- CVE-2024-47537 GStreamer is a library for constructing graphs of media-handling components. Also affects gstreamer1-plugins-good
- CVE-2023-37327 GStreamer FLAC File Parsing Integer Overflow Remote Code Execution Vulnerability. Also affects gstreamer1-plugins-good
- CVE-2022-1925 DOS / potential heap overwrite in mkv demuxing using HEADERSTRIP decompression. Also affects gst-plugins-good1.0
- CVE-2022-1924 DOS / potential heap overwrite in mkv demuxing using lzo decompression. Also affects gst-plugins-good1.0