{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "last_affected": "2.5.34"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "c4cd525d7461c26b89b4705dc74fc4b84d57ff3a"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "a4ec9cc8b799d3e620c89feeaeb3ec86f362a12f"
            },
            {
              "fixed": "c4cd525d7461c26b89b4705dc74fc4b84d57ff3a"
            }
          ],
          "repo": "https://github.com/gphoto/libgphoto2",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4f44-frcc-8824"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-121"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138158.json"
  },
  "details": "libgphoto2 through 2.5.34 contains a stack buffer overflow in sierra_get_string_register() that lets a malicious sierra-protocol camera or USB device overwrite stack memory. When files are listed, the device can answer the file-name register with an oversized packet, writing up to 32 KB past small stack buffers to cause crashes or possible code execution.",
  "id": "CVE-2026-138158",
  "modified": "2026-11-28T03:45:24.430790397Z",
  "published": "2026-11-28T02:21:56.791Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138158.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/gphoto/libgphoto2"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/gphoto/libgphoto2/blob/v2.5.34/camlibs/sierra/library.c#L1285-L1289"
    },
    {
      "type": "FIX",
      "url": "https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3a"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138158"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-stack-buffer-overflow-via-sierra-get-string-register"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()"
}