---
id: CVE-2019-5063
aliases:
  - GHSA-m6vm-8g8v-xfjh
  - PYSEC-2026-2801
  - PYSEC-2026-2826
  - PYSEC-2026-2840
  - PYSEC-2026-724
title: Out-of-bounds Write in OpenCV
summary: Out-of-bounds Write in OpenCV
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
vendor: opencv-python
product: opencv-python
ecosystem: pip
affected:
  - opencv-python <= 4.1.0.25
  - opencv-python-headless <= 4.1.0.25
  - opencv-contrib-python <= 4.1.0.25
  - opencv-contrib-python-headless <= 4.1.0.25
published: '2021-10-12'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:49:16.253630526Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-m6vm-8g8v-xfjh'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2019-5063'
  - url: 'https://github.com/opencv/opencv/issues/16951'
  - url: 'https://github.com/opencv/opencv-python'
  - url: 'https://github.com/opencv/opencv-python/releases/tag/25'
  - url: 'https://talosintelligence.com/vulnerability_reports/TALOS-2019-0852'
  - url: 'https://www.oracle.com//security-alerts/cpujul2021.html'
  - url: 'https://www.oracle.com/security-alerts/cpuApr2021.html'
tags:
  - osv
  - pip
epss: 0.21108
epssPercentile: 0.97474
ingestedAt: '2026-07-08T18:25:51.152Z'
---

## Overview

An exploitable heap buffer overflow vulnerability exists in the data structure persistence functionality of OpenCV 4.1.0 (corresponds with OpenCV-Python 4.1.0.25). A specially crafted XML file can cause a buffer overflow, resulting in multiple heap corruptions and potential code execution. An attacker can provide a specially crafted file to trigger this vulnerability.

## Affected packages

- `opencv-python <= 4.1.0.25`
- `opencv-python-headless <= 4.1.0.25`
- `opencv-contrib-python <= 4.1.0.25`
- `opencv-contrib-python-headless <= 4.1.0.25`

## Remediation

Refer to the advisory for the patched release.
