OpenCV NULL Pointer Dereference Vulnerability - CVE-2019-14493
Summary
CVE-2019-14493: An issue was discovered in OpenCV before 4.1.1. There is a NULL pointer dereference in the function cv::XMLParser::parse at modules/core/src/persistence.cpp. Affects opencv across 3 version ranges.
< 4.1.2+dfsg-3
< 0915b7eaddba3c06d83e201c9a7595e73801f417
< 693877212d34f2d5e3bbf29287aa1db2d07d4d6d
Fixed in 4.1.2+dfsg-3. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
OpenCV is an open-source computer vision and machine learning software library that provides a common infrastructure for computer vision applications. It is widely used in real-time image processing, machine learning, and robotics. The library is designed to be efficient and flexible, allowing developers to create complex applications with ease. However, prior to version 4.1.1, OpenCV contained a vulnerability that could lead to a NULL pointer dereference, potentially causing application crashes.
Vulnerability Detail
CVE-2019-14493 is a vulnerability found in OpenCV versions before 4.1.1, specifically in the cv::XMLParser::parse function located in the modules/core/src/persistence.cpp file. This vulnerability arises from improper handling of NULL pointers, which can lead to unexpected behavior, including application crashes. The severity of this vulnerability is rated with a CVSS score of 7.5, indicating a high risk for systems utilizing affected versions of OpenCV. Attackers could exploit this vulnerability to disrupt services or cause denial of service (DoS) conditions.
How To Fix
Minimum fixed version
4.1.2+dfsg-3
This is the first release that contains the fix.
sudo apt-get install --only-upgrade opencv
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading is not immediately possible, consider implementing input validation to ensure that the data passed to the XML parser does not contain NULL values. This can help mitigate the risk of triggering the vulnerability until a proper upgrade can be performed.
Conclusion
CVE-2019-14493 is a significant vulnerability in OpenCV that can lead to application crashes due to NULL pointer dereference. It is crucial for users to upgrade to version 4.1.2 or later to protect their applications. In the meantime, implementing input validation can serve as a temporary workaround.
See every vulnerability recorded for opencv →
FAQ
CVE-2019-14493 is a vulnerability in OpenCV that allows for a NULL pointer dereference, potentially leading to application crashes.
OpenCV versions prior to 4.1.1 are affected by this vulnerability.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score for CVE-2019-14493 is 7.5, indicating a high severity level.
If an immediate upgrade is not possible, implement input validation to mitigate the risk of triggering the vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for opencv.