{"id":"CVE-2026-125257","kind":"vulnerability","aliases":["CVE-2026-125257"],"related":[],"title":"FFmpeg: off-by-one heap overflow when encoding Nellymoser audio with trellis","description":"FFmpeg through 9.0.2 contains an off-by-one heap overflow vulnerability in get_exponent_dynamic() in libavcodec/nellymoserenc.c that allows writing one element past the opt and path allocations. Attackers can supply crafted audio to applications encoding Nellymoser with trellis enabled, causing idx to equal OPT_SIZE and overwrite adjacent heap memory.","summary":"FFmpeg's Nellymoser encoder writes one element past its allocated buffers in get_exponent_dynamic() when trellis is enabled. A crafted audio input can overwrite adjacent heap memory, which can lead to code execution or a crash.","severity":"high","cvss":7.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"ffmpeg","fixed":[],"affected":"<= 9.0.2","ecosystem":"vendor"}],"ecosystems":[],"tags":["ffmpeg","libavcodec","media-processing","package"],"not_affected_if":["no-nellymoser-encoding","trellis-disabled"],"how_to_check":"- Run ffmpeg -version; 9.0.2 or earlier is affected unless your build includes commit 733bec3e\n- Only encoding is affected: check whether anything runs ffmpeg with -c:a nellymoser (trellis search) on untrusted audio; decoding and other codecs do not reach this code","fix":"Fixed on FFmpeg master by commit 733bec3e19759520ccdbeb6c3c0cae280bbe6dc5 (libavcodec/nellymoserenc.c). No released version stated yet; build from a tree containing the commit or check for a release after 9.0.2.","status":"open","published_at":"2026-11-09T20:18:11+00:00","first_seen_at":"2026-11-09T20:48:13+00:00","triaged_at":"2026-11-09T20:49:44+00:00","updated_at":"2026-11-09T20:50:59+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-09T20:49:44Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"unknown","title":"FFmpeg: off-by-one heap overflow when encoding Nellymoser audio with trellis","impact":"high","summary":"FFmpeg's Nellymoser encoder writes one element past its allocated buffers in get_exponent_dynamic() when trellis is enabled. A crafted audio input can overwrite adjacent heap memory, which can lead to code execution or a crash.","audience":"developers","category":"package","nicknames":[],"who_cares":["ffmpeg","libavcodec","media-processing"],"confidence":0.6,"fix_status":"unknown","needs_auth":"unknown","worst_case":"Heap memory corruption in the encoder could allow code execution.","analyst_note":"Confirm the fixed version and the patch commit from the linked GitHub patch and the VulnCheck advisory; the sources do not state a fixed version.","how_to_check":"- Check whether the FFmpeg version in use is `9.0.2` or earlier, for example with `ffmpeg -version`\n- Check whether any application encodes Nellymoser audio with trellis enabled, which is the condition the sources describe","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-nellymoser-encoding","trellis-disabled"],"who_is_affected":"Applications that link FFmpeg's libavcodec and encode Nellymoser audio with trellis enabled are exposed, and the attacker supplies the audio input. Systems that only decode media, or that never encode Nellymoser, are not exposed by this description. The sources do not name a fixed version, so the team should check the upstream patch linked from the NVD record.","user_interaction":"unknown","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000765,"input_tokens":4633,"output_tokens":604,"severity_before":"high"},"analyst_status":"done","analyst_note":"Confirm the fixed version and the patch commit from the linked GitHub patch and the VulnCheck advisory; the sources do not state a fixed version.","search":"'-125257':16A,19A '-2026':15A,18A '9.0.2':66C 'adjac':52B,113C 'alloc':36B,92C 'allow':83C 'applic':99C 'attack':93C 'audio':11A,48B,97C 'buffer':37B 'caus':105C 'code':59B 'contain':67C 'craft':47B,96C 'crash':63B 'cve':14A,17A 'dynam':41B,79C 'element':33B,86C 'enabl':45B,104C 'encod':9A,30B,100C 'equal':108C 'execut':60B 'expon':40B,78C 'ffmpeg':1A,20A,21B,27B,64C 'get':39B,77C 'heap':6A,53B,73C,114C 'idx':106C 'input':49B 'lead':57B 'libavcodec':22B 'libavcodec/nellymoserenc.c':81C 'media':24B 'media-process':23B 'memori':54B,115C 'nellymos':10A,29B,101C 'off-by-on':2A,69C 'one':5A,32B,72C,85C 'opt':89C,109C 'overflow':7A,74C 'overwrit':51B,112C 'packag':26B 'past':34B,87C 'path':91C 'process':25B 'size':110C 'suppli':95C 'trelli':13A,43B,103C 'vulner':75C 'write':31B,84C","nicknames":[],"mitigations":[],"who_affected":"Applications and services that run FFmpeg (libavcodec) up to 9.0.2 and encode audio to Nellymoser with trellis enabled on untrusted input, such as media-processing pipelines. Teams that only decode, or never use the Nellymoser encoder, can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"developers","plain_action":null,"pkeys":["ffmpeg"],"ptokens":["ffmpeg"],"labels":["ffmpeg","high","libavcodec","mediaprocessing","package"],"campaign_type":null,"search_a":"'-125257':16A,19A '-2026':15A,18A 'audio':11A 'cve':14A,17A 'encod':9A 'ffmpeg':1A,20A 'heap':6A 'nellymos':10A 'off-by-on':2A 'one':5A 'overflow':7A 'trelli':13A","search_b":"'adjac':52B 'alloc':36B 'audio':48B 'buffer':37B 'code':59B 'craft':47B 'crash':63B 'dynam':41B 'element':33B 'enabl':45B 'encod':30B 'execut':60B 'expon':40B 'ffmpeg':21B,27B 'get':39B 'heap':53B 'input':49B 'lead':57B 'libavcodec':22B 'media':24B 'media-process':23B 'memori':54B 'nellymos':29B 'one':32B 'overwrit':51B 'packag':26B 'past':34B 'process':25B 'trelli':43B 'write':31B","search_c":"'9.0.2':66C 'adjac':113C 'alloc':92C 'allow':83C 'applic':99C 'attack':93C 'audio':97C 'caus':105C 'contain':67C 'craft':96C 'dynam':79C 'element':86C 'enabl':104C 'encod':100C 'equal':108C 'expon':78C 'ffmpeg':64C 'get':77C 'heap':73C,114C 'idx':106C 'libavcodec/nellymoserenc.c':81C 'memori':115C 'nellymos':101C 'off-by-on':69C 'one':72C,85C 'opt':89C,109C 'overflow':74C 'overwrit':112C 'past':87C 'path':91C 'size':110C 'suppli':95C 'trelli':103C 'vulner':75C 'write':84C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-09T20:18:11+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-125257","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125257","severity":null,"published_at":"2026-11-09T20:18:11+00:00","modified_at":"2026-11-09T20:18:11+00:00","first_seen_at":"2026-11-09T20:48:13+00:00","fetched_at":"2026-11-09T20:48:13+00:00","note":null},{"source":"analyst","external_id":"CVE-2026-125257:2346","url":null,"severity":null,"published_at":"2026-11-09T20:50:59+00:00","modified_at":"2026-11-09T20:50:59+00:00","first_seen_at":"2026-11-09T20:50:59+00:00","fetched_at":"2026-11-09T20:50:59+00:00","note":"Read FFmpeg commit 733bec3e (1-line clamp OPT_SIZE -> OPT_SIZE-1 in get_exponent_dynamic, found by Zheng Yu/depthfirst) and VulnCheck advisory (<=9.0.2). No fixed release named in either; no exploitation or PoC stated. Exa out of credits, used WebFetch."}],"documents":[{"id":109725,"url":"https://github.com/FFmpeg/FFmpeg/commit/733bec3e19759520ccdbeb6c3c0cae280bbe6dc5","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":109726,"url":"https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-overflow-via-nellymoser-encoder-trellis-search","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}