CVE-2022-1920

7.8 HIGH

📋 TL;DR

This CVE describes an integer overflow vulnerability in the matroskademux element of GStreamer's gst_matroska_demux_add_wvpk_header function. When parsing specially crafted Matroska files, it can lead to heap overwrite and potentially arbitrary code execution. Systems using vulnerable versions of GStreamer for media processing are affected.

💻 Affected Systems

Products:
  • GStreamer
Versions: GStreamer versions before 1.20.4
Operating Systems: Linux, Unix-like systems, Windows (if GStreamer is installed)
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using GStreamer to parse Matroska files is vulnerable. This includes media players, video editors, and web applications with media processing capabilities.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the application using GStreamer, potentially leading to full system compromise.

🟠

Likely Case

Application crash (denial of service) or limited memory corruption leading to instability.

🟢

If Mitigated

No impact if patched or if vulnerable component is not exposed to untrusted input.

🌐 Internet-Facing: MEDIUM - Exploitation requires processing malicious media files, which could be delivered via web applications or media servers.
🏢 Internal Only: LOW - Typically requires user interaction to open malicious files or specific media processing workflows.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting a malicious Matroska file that triggers the integer overflow. No public exploit code has been disclosed as of the advisory dates.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: GStreamer 1.20.4 and later

Vendor Advisory: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1226

Restart Required: Yes

Instructions:

1. Update GStreamer to version 1.20.4 or later using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade gstreamer1.0. 3. Restart any applications or services using GStreamer.

🔧 Temporary Workarounds

Disable matroskademux element

linux

Prevent use of the vulnerable component by disabling or blacklisting the matroskademux element in GStreamer configuration.

export GST_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ (adjust path) and remove or rename libgstmatroska.so

🧯 If You Can't Patch

  • Restrict processing of untrusted Matroska files by implementing file type validation and sandboxing media processing components.
  • Use network segmentation to isolate systems running vulnerable GStreamer versions from untrusted networks.

🔍 How to Verify

Check if Vulnerable:

Check GStreamer version with: gst-inspect-1.0 --version. If version is earlier than 1.20.4, the system is vulnerable.

Check Version:

gst-inspect-1.0 --version

Verify Fix Applied:

After patching, verify version is 1.20.4 or later with: gst-inspect-1.0 --version.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes or abnormal termination logs from processes using GStreamer, especially when processing media files.

Network Indicators:

  • Unusual outbound connections from media processing applications post-crash.

SIEM Query:

Process: (gst-launch OR media_app) AND Event: (Crash OR Segmentation fault) AND File: (*.mkv OR *.webm)

🔗 References

📤 Share & Export