CVE-2017-12864
Integer Overflow or Wraparound in OpenCV
Reported by mitre · Published August 15, 2017
opencv-python is fixed in 3.3.1.11 and 3.3.0.9 (PyPI)
In opencv/modules/imgcodecs/src/grfmt_pxm.cpp, function ReadNumber did not checkout the input length, which lead to integer overflow. If the image is from remote, may lead to remote code execution or denial of service. This affects Opencv 3.3 and earlier.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| opencv-python | PyPI | 3.3.1.11, 3.3.0.9 |
| opencv-contrib-python | PyPI | 3.3.1.11, 3.3.0.9 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| n/a | n/a | * |
| PyPI | opencv-python | 0 |
| PyPI | opencv-contrib-python | 0 |
Timeline
- Aug 15, 2017 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 CVE Updated
- Mar 9, 2026 Security Advisory (2 in total, the first dated here)
- Oct 3, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2017-12864
vulnetix vdb fixes CVE-2017-12864
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-12864/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20180722 [SECURITY] [DLA 1438-1] opencv security update mailing-listx_refsource_MLIST
- GLSA-201712-02 vendor-advisoryx_refsource_GENTOO
- x_refsource_MISC
- [debian-lts-announce] 20211030 [SECURITY] [DLA 2799-1] opencv security update mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2017-12864 advisory
- https://github.com/opencv/opencv/pull/9376 patch
- https://github.com/advisories/GHSA-267x-w5hx-8hjr advisory