# CVE-2026-138158: libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()

- Severity: High 7.0 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 39% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-11-28T02:21:56.791Z
- Modified: 2026-11-30T16:17:20.413Z
- Weaknesses: CWE-121
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- gphoto libgphoto2: up to 2.5.34

## Every score

- VulnCheck: CVSS:4.0 7.0 High `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`
- VulnCheck: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824> (exploit, vendor-advisory)
- <https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3a> (patch)
- <https://github.com/gphoto/libgphoto2/blob/v2.5.34/camlibs/sierra/library.c#L1285-L1289> (technical-description)
- <https://github.com/gphoto/libgphoto2> (product)
- <https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-stack-buffer-overflow-via-sierra-get-string-register> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-138158](https://www.cve.org/CVERecord?id=CVE-2026-138158), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-138158](https://nvd.nist.gov/vuln/detail/CVE-2026-138158), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-138158 · Whole record: https://cve.day/CVE-2026-138158.json · Rebuilt by cve.day 2026-11-30T16:32:19.008Z
