Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2016-6905

The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.3 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA image.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2016-6905
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:09 UTC · Revision 1

Source evidence

CVE-2016-6905

core-osv · Original source

Published 3 Oct 2016, 21:59 UTC

The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.3 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA image.

osv:CVE-2016-6905
Complete source record
{
  "id": "442b5796ec5979e37ac1570624a5dda7f71d6280ee6310a8225e517cfcd1d7a5",
  "url": "https://osv.dev/vulnerability/CVE-2016-6905",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2016-6905",
    "summary": "The read_image_tga function in gd_tga.c in the GD Graphics Library (aka libgd) before 2.2.3 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted TGA image.",
    "evidence": "osv:CVE-2016-6905",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2016-6905",
      "aliases": [
        "CVE-2016-6905"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/libgd/libgd",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "ec6b61f591b949a1431280899f21c098ffe8ec14"
                },
                {
                  "fixed": "01c61f8ab110a77ae64b5ca67c244c728c506f03"
                },
                {
                  "fixed": "3c2b605d72e8b080dace1d98a6e50b46c1d12186"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:libgd:libgd:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.2.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "01c61f8ab110a77ae64b5ca67c244c728c506f03"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "3c2b605d72e8b080dace1d98a6e50b46c1d12186"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "gd-2.2.2",
            "gd-2.2.1",
            "gd-2.2.0",
            "gd-2.1.1",
            "gd-2.1.0",
            "gd-2.1.0-rc1",
            "gd-2.1.0-alpha1",
            "GD_2_0_34RC1",
            "GD_2_0_33",
            "GD_2_0_32",
            "GD_2_0_31",
            "GD_2_0_30",
            "GD_2_0_29",
            "GD_2_0_28",
            "GD_2_0_27",
            "GD_2_0_26",
            "GD_2_0_25",
            "GD_2_0_24",
            "GD_2_0_23",
            "GD_2_0_22",
            "GD_2_0_21",
            "GD_2_0_20",
            "GD_2_0_19",
            "GD_2_0_18",
            "GD_2_0_17",
            "GD_2_0_15",
            "GD_2_0_14",
            "GD_2_0_13",
            "GD_2_0_12",
            "GD_2_0_11",
            "GD_2_0_10",
            "GD_2_0_9",
            "GD_2_0_8",
            "GD_2_0_7",
            "GD_2_0_6",
            "GD_2_0_5",
            "GD_2_0_4",
            "GD_2_0_3",
            "GD_2_0_2",
            "GD_2_0_1",
            "GD_2_0_0",
            "GD_1_8_4",
            "GD_1_8_3",
            "GD_1_8_1",
            "GD_1_8_0",
            "GD_1_7_3",
            "GD_1_7_2",
            "GD_1_7_1",
            "GD_1_7_0",
            "GD_1_6_3",
            "GD_1_6_2",
            "GD_1_6_1",
            "GD_1_6_0",
            "GD_1_5_0",
            "GD_1_4_0",
            "GD_1_3_0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-6905.json",
            "vanir_signatures": [
              {
                "id": "CVE-2016-6905-2e144a9c",
                "digest": {
                  "length": 2352,
                  "function_hash": "150222452826111607911999430026282216493"
                },
                "source": "https://github.com/libgd/libgd/commit/01c61f8ab110a77ae64b5ca67c244c728c506f03",
                "target": {
                  "file": "src/gd_tga.c",
                  "function": "read_image_tga"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2016-6905-9e671305",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "263338616471124220503043253082437292904",
                    "31000100657142559304979551962267908643",
                    "183804931480520940787143071533336557063",
                    "242900354783927881132320031000585444472",
                    "137576676101298210998585372321847849839",
                    "229260443438122527870740329493642306007",
                    "14336425063350563475893674927401561796",
                    "170275526587140690810667574411797550226",
                    "243326598763063495698113086608308225748",
                    "218421369725904409339189520753653110577",
                    "294969011813775192170813686771974570232",
                    "160404730317204032626266116646092874034",
                    "269838563000061620325829859461030474698",
                    "284493872219512788957055064059739972542",
                    "71144925059152600392708027950444535143",
                    "144189907098002330028681126227675878716",
                    "17448355068713968007013570008885764610",
                    "15881539661546982613586794208154286622",
                    "298383346940574426894356307041301056546",
                    "224983335206663834060894548683091508842",
                    "154398766447558974567395503910612333357",
                    "96252021667969076384995295891192479774",
                    "54519818484878553276522718568291377044",
                    "85785600637868727890616453391076703592",
                    "243326598763063495698113086608308225748",
                    "218421369725904409339189520753653110577",
                    "294969011813775192170813686771974570232",
                    "160404730317204032626266116646092874034",
                    "269838563000061620325829859461030474698",
                    "284493872219512788957055064059739972542",
                    "71144925059152600392708027950444535143",
                    "144189907098002330028681126227675878716",
                    "152877145846678278752206901764412020079",
                    "268154877812631065202409925863302675645",
                    "188849533591271881583276972169876036475",
                    "241634334627581351892286265088852170362",
                    "108587633537507210242609878158511307392",
                    "317020317628908665409671761851493114880"
                  ]
                },
                "source": "https://github.com/libgd/libgd/commit/01c61f8ab110a77ae64b5ca67c244c728c506f03",
                "target": {
                  "file": "src/gd_tga.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2016-6905-a02528cb",
                "digest": {
                  "length": 2116,
                  "function_hash": "318558471273598071253749944011275991116"
                },
                "source": "https://github.com/libgd/libgd/commit/3c2b605d72e8b080dace1d98a6e50b46c1d12186",
                "target": {
                  "file": "src/gd_tga.c",
                  "function": "read_image_tga"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2016-6905-cd268584",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "35425011894096212034497675172420309773",
                    "137576676101298210998585372321847849839",
                    "229260443438122527870740329493642306007",
                    "28263119248774846812552438829400142818",
                    "262929829821917167811831011805076192958",
                    "206991234581768884905216919559318061037",
                    "144189907098002330028681126227675878716",
                    "17448355068713968007013570008885764610",
                    "24108349718832749568963134875678576322",
                    "26753026693652278219589919450218726435",
                    "180686312022484326960970275757886384624",
                    "206991234581768884905216919559318061037",
                    "144189907098002330028681126227675878716",
                    "152877145846678278752206901764412020079",
                    "268154877812631065202409925863302675645",
                    "188849533591271881583276972169876036475",
                    "241634334627581351892286265088852170362"
                  ]
                },
                "source": "https://github.com/libgd/libgd/commit/3c2b605d72e8b080dace1d98a6e50b46c1d12186",
                "target": {
                  "file": "src/gd_tga.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:13:21Z"
          }
        }
      ],
      "modified": "2026-10-20T13:13:21.501357957Z",
      "provider": "osv",
      "references": [
        "https://github.com/libgd/libgd/commit/01c61f8ab110a77ae64b5ca67c244c728c506f03",
        "https://github.com/libgd/libgd/commit/3c2b605d72e8b080dace1d98a6e50b46c1d12186",
        "https://github.com/libgd/libgd/issues/248",
        "https://github.com/libgd/libgd/pull/251"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*"
            ],
            "vendor_product": "opensuse:leap",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "42.1"
                  },
                  {
                    "last_affected": "42.1"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:*"
            ],
            "vendor_product": "opensuse:opensuse",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "13.2"
                  },
                  {
                    "last_affected": "13.2"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2016-6905",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 387322,
  "published_at": "2016-10-03T21:59:05.957+00:00"
}