VYPR
High severityNVD Advisory· Published Aug 1, 2019· Updated Aug 5, 2024

CVE-2019-14491

CVE-2019-14491

Description

An issue was discovered in OpenCV before 3.4.7 and 4.x before 4.1.1. There is an out of bounds read in the function cv::predictOrdered<cv::HaarEvaluator> in modules/objdetect/src/cascadedetect.hpp, which leads to denial of service.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Out-of-bounds read in OpenCV's Haar cascade classifier leads to denial of service via crafted cascade file.

Vulnerability

An out-of-bounds read vulnerability exists in the cv::predictOrdered<cv::HaarEvaluator> function in modules/objdetect/src/cascadedetect.hpp of OpenCV. The issue occurs when evaluating Haar feature cascades: the index leafOfs - idx can become negative or exceed the bounds of the cascadeLeaves array, leading to reading invalid memory [2]. This affects OpenCV versions before 3.4.7 and 4.x before 4.1.1.

Exploitation

An attacker can trigger this vulnerability by providing a specially crafted Haar cascade XML file to an application using OpenCV's object detection functions (e.g., detectMultiScale). No authentication or special privileges are required; the attacker only needs to supply the malicious cascade file or cause the application to load it. The out-of-bounds read occurs during the evaluation of the cascade stages, resulting in a crash.

Impact

Successful exploitation leads to a denial of service (DoS) due to a segmentation fault or application crash. The vulnerability does not appear to allow arbitrary code execution or information disclosure beyond the crash.

Mitigation

The issue is fixed in OpenCV versions 3.4.7 and 4.1.1, released in July 2019 [3][4]. Users should upgrade to these or later versions. No workarounds are documented; if upgrading is not possible, avoid loading untrusted cascade files.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
opencv-pythonPyPI
< 3.4.7.283.4.7.28
opencv-pythonPyPI
>= 4.0.0.21, < 4.1.1.264.1.1.26
opencv-python-headlessPyPI
< 3.4.7.283.4.7.28
opencv-python-headlessPyPI
>= 4.0.0.21, < 4.1.1.264.1.1.26
opencv-contrib-pythonPyPI
< 3.4.7.283.4.7.28
opencv-contrib-pythonPyPI
>= 4.0.0.21, < 4.1.1.264.1.1.26
opencv-contrib-python-headlessPyPI
< 3.4.7.283.4.7.28
opencv-contrib-python-headlessPyPI
>= 4.0.0.21, < 4.1.1.264.1.1.26

Affected products

11

Patches

2
4a7ca5a29103

OpenCV version++ (3.4.7)

https://github.com/opencv/opencvAlexander AlekhinJul 25, 2019via osv
1 file changed · +1 1
  • modules/core/include/opencv2/core/version.hpp+1 1 modified
    @@ -8,7 +8,7 @@
     #define CV_VERSION_MAJOR    3
     #define CV_VERSION_MINOR    4
     #define CV_VERSION_REVISION 7
    -#define CV_VERSION_STATUS   "-pre"
    +#define CV_VERSION_STATUS   ""
     
     #define CVAUX_STR_EXP(__A)  #__A
     #define CVAUX_STR(__A)      CVAUX_STR_EXP(__A)
    
693877212d34

Fixed video writer filename check for plugins

https://github.com/opencv/opencvMaksim ShabuninJul 9, 2019via osv
1 file changed · +2 1
  • modules/videoio/src/backend_plugin.cpp+2 1 modified
    @@ -480,7 +480,8 @@ class PluginWriter : public cv::IVideoWriter
             if (plugin_api->Writer_open)
             {
                 CV_Assert(plugin_api->Writer_release);
    -            if (CV_ERROR_OK == plugin_api->Writer_open(filename.empty() ? 0 : filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer))
    +            CV_Assert(!filename.empty());
    +            if (CV_ERROR_OK == plugin_api->Writer_open(filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer))
                 {
                     CV_Assert(writer);
                     return makePtr<PluginWriter>(plugin_api, writer);
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.