{"id":"CVE-2018-5268","aliases":["GHSA-9g8h-pjm4-q92p","PYSEC-2026-2814","PYSEC-2026-705"],"title":"Out-of-bounds Write in OpenCV.","summary":"Out-of-bounds Write in OpenCV.","severity":"medium","cvss":5.5,"cvssVector":"CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","vendor":"opencv-python","product":"opencv-python","ecosystem":"pip","affected":["opencv-python < 3.4.1.15","opencv-contrib-python < 3.4.1.15"],"patched":["opencv-python 3.4.1.15","opencv-contrib-python 3.4.1.15"],"published":"2021-10-12","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:49:09.245218764Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-9g8h-pjm4-q92p","references":[{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5268"},{"url":"https://github.com/opencv/opencv/issues/10541"},{"url":"https://github.com/opencv/opencv/pull/10566/commits/435a3e337bd9d4e11af61cf8b8afca067bf1a8aa"},{"url":"https://github.com/opencv/opencv-python"},{"url":"https://lists.debian.org/debian-lts-announce/2018/04/msg00019.html"},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00030.html"},{"url":"https://lists.debian.org/debian-lts-announce/2021/10/msg00028.html"},{"url":"http://www.securityfocus.com/bid/106945"}],"tags":["osv","pip"],"epss":0.01519,"epssPercentile":0.73032,"ingestedAt":"2026-07-08T18:25:47.854Z","slug":"CVE-2018-5268","body":"## Overview\n\nIn OpenCV 3.3.1 (corresponding with OpenCV-Python 3.3.1.11), a heap-based buffer overflow happens in cv::Jpeg2KDecoder::readComponent8u in modules/imgcodecs/src/grfmt_jpeg2000.cpp when parsing a crafted image file.\n\n## Affected packages\n\n- `opencv-python < 3.4.1.15`\n- `opencv-contrib-python < 3.4.1.15`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `opencv-python 3.4.1.15`\n- `opencv-contrib-python 3.4.1.15`","depth":"sunlit","depthScore":31,"depthScoreParts":{"impact":30.3,"likelihood":0.3,"exploitation":0,"ransomware":0},"changes":[]}