Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2017-12603

OpenCV (Open Source Computer Vision Library) through 3.3 has an invalid write in the cv::RLByteStream::getBytes function in modules/imgcodecs/src/bitstrm.cpp when reading an image file by using cv::imread, as demonstrated by the 2-opencv-heapoverflow-fseek test case.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2017-12603
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:25 UTC · Revision 1

Source evidence

CVE-2017-12603

core-osv · Original source

Published 7 Aug 2017, 01:29 UTC

OpenCV (Open Source Computer Vision Library) through 3.3 has an invalid write in the cv::RLByteStream::getBytes function in modules/imgcodecs/src/bitstrm.cpp when reading an image file by using cv::imread, as demonstrated by the 2-opencv-heapoverflow-fseek test case.

osv:CVE-2017-12603
Complete source record
{
  "id": "d30d9476f30e339a4a372161993caf4ebe761800c9b25c8fe83fbe2d262dd26a",
  "url": "https://osv.dev/vulnerability/CVE-2017-12603",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2017-12603",
    "summary": "OpenCV (Open Source Computer Vision Library) through 3.3 has an invalid write in the cv::RLByteStream::getBytes function in modules/imgcodecs/src/bitstrm.cpp when reading an image file by using cv::imread, as demonstrated by the 2-opencv-heapoverflow-fseek test case.",
    "evidence": "osv:CVE-2017-12603",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2017-12603",
      "aliases": [
        "CVE-2017-12603",
        "GHSA-6v6p-p97v-g2p7",
        "PYSEC-2026-2809",
        "PYSEC-2026-701"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/opencv/opencv",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "e8357c0544c82beda237defc0abc90ee28992ee7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:opencv:opencv:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "3.3.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.3.0-rc",
            "3.3.0-cvsdk",
            "3.2.0-rc",
            "2.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-12603.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/opencv/opencv_contrib",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "2a9d1b22ed76eb22fad1a5edf6faf4d05f207b13"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:opencv:opencv:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "3.3.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.3.0",
            "3.3.0-rc",
            "3.2.0",
            "3.2.0-rc",
            "3.1.0",
            "3.0.0",
            "3.0.0-rc1",
            "3.0.0-beta"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-12603.json"
          }
        }
      ],
      "modified": "2026-10-24T10:47:23.732220595Z",
      "provider": "osv",
      "references": [
        "https://github.com/xiaoqx/pocs/blob/master/opencv.md",
        "https://lists.debian.org/debian-lts-announce/2018/07/msg00030.html",
        "https://lists.debian.org/debian-lts-announce/2021/10/msg00028.html",
        "https://security.gentoo.org/glsa/201712-02",
        "https://github.com/opencv/opencv/issues/9309"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  },
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2017-12603",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 441191,
  "published_at": "2017-08-07T01:29:00.577+00:00"
}