Skip to content
Heist/ feed
Back to feed
High

FFmpeg 3.0 - 8.1.2 vf_swaprect Out-of-Bounds Write via NV12 Frame Processing

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-65706
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:47 UTC · Revision 1

Source evidence

FFmpeg 3.0 - 8.1.2 vf_swaprect Out-of-Bounds Write via NV12 Frame Processing

core-osv · Original source

Published 23 Jul 2026, 19:05 UTC

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.

osv:CVE-2026-65706
Complete source record
{
  "id": "84c4784643714ed2a06fe968a554e925659127232fbb18d6d6a150cc44589b38",
  "url": "https://osv.dev/vulnerability/CVE-2026-65706",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "FFmpeg 3.0 - 8.1.2 vf_swaprect Out-of-Bounds Write via NV12 Frame Processing",
    "summary": "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.",
    "evidence": "osv:CVE-2026-65706",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-65706",
      "aliases": [
        "CVE-2026-65706"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.ffmpeg.org/ffmpeg.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c40983a6f631d22fede713d535bb9c31d5c9740c"
                },
                {
                  "last_affected": "38b88335f99e76ed89ff3c93f877fdefce736c13"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0"
                      },
                      {
                        "last_affected": "8.1.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65706.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/ffmpeg/ffmpeg",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c40983a6f631d22fede713d535bb9c31d5c9740c"
                },
                {
                  "last_affected": "38b88335f99e76ed89ff3c93f877fdefce736c13"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0"
                      },
                      {
                        "last_affected": "8.1.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65706.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.262777178Z",
      "provider": "osv",
      "references": [
        "https://code.ffmpeg.org/FFmpeg/FFmpeg",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65706.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-65706",
        "https://www.vulncheck.com/advisories/ffmpeg-vf-swaprect-out-of-bounds-write-via-nv12-frame-processing",
        "https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23779",
        "https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/a7e38b617b32f996beaa371bbf04b39907d7a527"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-131",
          "CWE-787"
        ],
        "cna_assigner": "VulnCheck",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.0"
                  },
                  {
                    "last_affected": "8.1.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65706.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-65706",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 488756,
  "published_at": "2026-07-23T19:05:11.56+00:00"
}