Connect with us

Hi, what are you looking for?



Serious Vulnerabilities Patched in OpenCV Computer Vision Library

Two high-severity buffer overflow vulnerabilities patched in the OpenCV library could lead to arbitrary code execution.

Two high-severity buffer overflow vulnerabilities patched in the OpenCV library could lead to arbitrary code execution.

OpenCV (Open Source Computer Vision Library) is an open source library that contains over 2,500 optimized computer vision and machine learning algorithms and which aims to accelerate the use of machine perception in commercial products.

The library is being used by Google, Yahoo, Microsoft, Intel, IBM, Sony, Honda, Toyota, and others in a broad range of facial recognition technology, robotics, motion tracking, and other applications. OpenCV has C++, Python, Java and MATLAB interfaces, along with Windows, Linux, Android and Mac OS support.

The release of OpenCV 4.2.0 at the end of December 2019 arrived with numerous improvements and fixes, including patches for two buffer overflow vulnerabilities that were discovered by security researchers at Cisco Talos.

Tracked as CVE-2019-5063 (CVSS score 8.8), the first issue is a heap buffer overflow vulnerability that resides in the data structure persistence functionality of OpenCV 4.1.0, which allows developers to write and retrieve OpenCV data structures to/from a file on disk.

According to Talos, when parsing an XML file containing a potential character entity reference and encountering the ampersand, the API continues to digest alphanumeric characters until a semicolon. If the string does not match any string in the switch statement, the data is copied to a buffer as is.

This allows an attacker to create a special XML file and trigger a buffer overflow, which could lead to multiple heap corruptions and potential code execution.

The second vulnerability, CVE-2019-5064 (CVSS score 8.8), also resides in the data structure persistence functionality of the library, and can be triggered using a specially crafted JSON file, Talos explains.

Advertisement. Scroll to continue reading.

The issue is that, when parsing a JSON file and encountering a null byte, OpenCV copies to the buffer the entire value up to that point. Despite that, however, no check is performed to determine whether the JSON value will overflow the destination buffer.

Both vulnerabilities were found in OpenCV version 4.1.0 and were reported to the vendor in July 2019.

Related: Many Vulnerabilities Found in Barco Wireless Presentation Systems

Related: VMware Patches ESXi Vulnerability That Earned Hacker $200,000

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment


Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.


SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.


People on the Move

Professional services company Slalom has appointed Christopher Burger as its first CISO.

Allied Universal announced that Deanna Steele has joined the company as CIO for North America.

Former DoD CISO Jack Wilmer has been named CEO of defensive and offensive cyber solutions provider SIXGEN.

More People On The Move

Expert Insights

Related Content


Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...


A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...


Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.


Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.