CVE-2018-5268 json
Out-of-bounds Write in OpenCV.
published 2018-01-08 8 y ago modified 2026-09-10 1 mo ago also GHSA-9g8h-pjm4-q92p , PYSEC-2026-2814 , PYSEC-2026-705 , EUVD-2021-2185
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi opencv-python 3.4.1.15
- pypi opencv-contrib-python 3.4.1.15
- opencv Debian 14, Debian 13, Debian 12 3.2.0+dfsg-6
debian advisories DEBIAN-CVE-2018-5268
- opencv Ubuntu 16.04 LTS 2.4.9.1+dfsg-1.5ubuntu1.1
- opencv Ubuntu 18.04 LTS 3.2.0+dfsg-4ubuntu0.1
ubuntu advisories UBUNTU-CVE-2018-5268
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-5268 updated cvss 3.3
opencv: Heap-based buffer overflow in cv::Jpeg2KDecoder::readComponent8u
-
Red Hat Enterprise Linux 6 opencv, opencv-python Red Hat Enterprise Linux 7 opencv, opencv-core, opencv-python Red Hat Enterprise Linux 8 opencv, opencv-core, opencv-contrib, python3-opencvaffected: no fix planned “Will not fix”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.52% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/opencv/opencv/issues/10541 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
| GitHub | 3.0 | 5.5 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| OSV | 3.0 | 5.5 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | opencv-python | <3.4.1.15 |
3.4.1.15 |
| pypi | opencv-contrib-python | <3.4.1.15 |
3.4.1.15 |
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
github.com
/opencv/opencv/pull/10566/commits/435a3e337bd9d4e11af61cf8b8afca067bf1a8aa
web
-
github.com
/opencv/opencv/issues/10541
web, exploit, issue-tracking, mailing-list, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/07/msg00030.html
mailing-list, web, third-party-advisory
-
securityfocus.com
/bid/106945
vdb-entry, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/04/msg00019.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/10/msg00028.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2018-5268
advisory
-
github.com
/opencv/opencv-python
package
-
pypi.org
/project/opencv-python
package
-
github.com
/advisories/GHSA-9g8h-pjm4-q92p
advisory
-
pypi.org
/project/opencv-contrib-python
package
Sources
- CVE List CVE-2018-5268
- GitHub Advisory GHSA-9g8h-pjm4-q92p
- NVD CVE-2018-5268
- OSV PYSEC-2026-2814
- OSV PYSEC-2026-705
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.