FFmpeg versions 3.0 through 8.1.2 contain an out-of-bounds write vulnerability in the vf_swaprect video filter that allows attackers to corrupt heap memory by supplying a crafted NV12 video frame with odd width dimensions. The filter_frame() function reuses a temporary row buffer sized for plane 0's single-byte pixel step across all planes, causing an 18-byte memcpy into a 17-byte heap allocation when processing the two-byte-per-sample interleaved chroma plane of a 17x16 NV12 frame, resulting in heap corruption and process crash with potential for code execution.
Security readout for executives and security teams
Plain-English summary
A crafted video can trigger memory corruption when FFmpeg’s swaprect filter processes certain odd-width NV12 frames. Affected services may crash, and code execution is considered possible. Risk is greatest in media-processing systems that accept untrusted files and invoke this filter.
Executive priority
Treat as a high-priority remediation for exposed media-processing services, especially upload or transcoding systems handling untrusted content. Accelerate inventory and patch confirmation; lower priority may be reasonable only where swaprect is demonstrably unused or inputs are trusted and constrained.
Technical view
FFmpeg 3.0 through 8.1.2 improperly sizes a temporary row buffer in vf_swaprect. The buffer is sized using plane 0’s pixel step, then reused for the interleaved chroma plane, causing an out-of-bounds heap write during odd-width NV12 processing.
Likely exposure
Exposure requires an affected FFmpeg build, NV12 input with odd width, and processing through vf_swaprect. Internet-facing upload, transcoding, moderation, or analysis pipelines are higher concern when untrusted media can reach that filter. The supplied CVSS vector indicates local attack conditions and user participation.
Exploitation context
The sources describe a reproducible heap overwrite, process crash, and potential code execution. CISA KEV status is false, and the supplied sources do not establish active exploitation or public weaponization. Practical code execution reliability is not documented in this bundle.
Researcher notes
CWE-131 and CWE-787 apply: an undersized allocation enables an out-of-bounds write. The documented example writes 18 bytes into a 17-byte allocation for a 17x16 NV12 frame. The bundle supports crash and potential execution impact, but not demonstrated execution or exploitation prevalence.
Mitigation direction
Apply the referenced FFmpeg patch or a vendor release explicitly confirmed to include it.
Prioritize systems processing untrusted media through the swaprect filter.
Temporarily prevent untrusted odd-width NV12 content from reaching swaprect where operationally feasible.
Check downstream operating-system and application vendor advisories for packaged FFmpeg updates.
Validation and detection
Inventory embedded, system, container, and statically linked FFmpeg versions.
Identify workflows that invoke vf_swaprect on NV12 input.
Confirm deployed binaries incorporate commit a7e38b617b32f996beaa371bbf04b39907d7a527 or an equivalent vendor backport.
Review crash telemetry for media-processing failures involving swaprect or NV12 content.
Revalidate affected pipelines after remediation using controlled, non-production media tests.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-131: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
4Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-131 · source CWE mapping
Incorrect Calculation of Buffer Size
Incorrect Calculation of Buffer Size represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.