CVE-2018-5268 Out-of-bounds Write in OpenCV.

Medium 5.5 Published Updated

A heap-based buffer overflow in OpenCV's JPEG2000 decoder allows attackers to execute arbitrary code or cause denial of service via crafted images.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2018-5268?

CVE-2018-5268 is a medium-severity memory corruption vulnerability in Debian Debian Linux, published on 8 Jan 2018. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

In OpenCV 3.3.1, a heap-based buffer overflow happens in cv::Jpeg2KDecoder::readComponent8u in modules/imgcodecs/src/grfmt_jpeg2000.cpp when parsing a crafted image file.

Weakness: CWE-787

Which versions are affected by CVE-2018-5268?

6 open source packages ship an affected version, including opencv-contrib-python and opencv-python. It affects 2 products.

PackageAffectedFixed in
opencv-contrib-python PyPIAll versions3.4.1.15
opencv-contrib-python PyPIAll versions3.4.1.15
opencv-contrib-python PyPIAll versions3.4.1.15
opencv-python PyPIAll versions3.4.1.15
opencv-python PyPIAll versions3.4.1.15
opencv-python PyPIAll versions3.4.1.15

Products include Debian Debian Linux, Opencv Opencv.

How do I fix CVE-2018-5268?

Upgrade opencv-contrib-python to 3.4.1.15 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2018-5268 being exploited?

There is no known exploitation of CVE-2018-5268 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-5268, GHSA-9g8h-pjm4-q92p, PYSEC-2026-2814, PYSEC-2026-705, UBUNTU-CVE-2018-5268.

Is CVE-2018-5268 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free