---
id: CVE-2019-15939
aliases:
  - GHSA-hxfw-jm98-v4mq
  - PYSEC-2026-2799
  - PYSEC-2026-2822
  - PYSEC-2026-2838
  - PYSEC-2026-722
title: Divide By Zero in OpenCV.
summary: Divide By Zero in OpenCV.
severity: medium
cvss: 5.9
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'
vendor: opencv-python
product: opencv-python
ecosystem: pip
affected:
  - opencv-python < 4.1.1.26
  - opencv-python-headless < 4.1.1.26
  - opencv-contrib-python < 4.1.1.26
  - opencv-contrib-python-headless < 4.1.1.26
patched:
  - opencv-python 4.1.1.26
  - opencv-python-headless 4.1.1.26
  - opencv-contrib-python 4.1.1.26
  - opencv-contrib-python-headless 4.1.1.26
published: '2021-10-12'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:49:09.246494429Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-hxfw-jm98-v4mq'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2019-15939'
  - url: 'https://github.com/OpenCV/opencv/issues/15287'
  - url: 'https://github.com/opencv/opencv/pull/15382'
  - url: 'https://github.com/opencv/opencv-python'
  - url: 'https://lists.debian.org/debian-lts-announce/2021/10/msg00028.html'
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2019-12/msg00025.html'
tags:
  - osv
  - pip
epss: 0.0237
epssPercentile: 0.83116
ingestedAt: '2026-07-08T18:25:50.348Z'
---

## Overview

An issue was discovered in OpenCV 4.1.0 (OpenCV-Python 4.1.0.25). There is a divide-by-zero error in cv::HOGDescriptor::getDescriptorSize in modules/objdetect/src/hog.cpp.

## Affected packages

- `opencv-python < 4.1.1.26`
- `opencv-python-headless < 4.1.1.26`
- `opencv-contrib-python < 4.1.1.26`
- `opencv-contrib-python-headless < 4.1.1.26`

## Remediation

Upgrade to a patched release:

- `opencv-python 4.1.1.26`
- `opencv-python-headless 4.1.1.26`
- `opencv-contrib-python 4.1.1.26`
- `opencv-contrib-python-headless 4.1.1.26`
