PatchSiren cyber security CVE debrief
CVE-2026-138158 gphoto CVE debrief
A stack buffer overflow vulnerability exists in libgphoto2 through version 2.5.34, specifically in the sierra_get_string_register() function. This vulnerability allows a malicious sierra-protocol camera or USB device to overwrite stack memory, potentially leading to crashes or code execution. The issue arises when listing files, as the device can respond to the file-name register with an oversized packet, writing up to 32 KB past small stack buffers.
- Vendor
- gphoto
- Product
- libgphoto2
- CVSS
- HIGH 7
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-11-28
- Original CVE updated
- 2026-11-28
- Advisory published
- 2026-11-28
- Advisory updated
- 2026-11-28
Who should care
Defenders responsible for systems or devices using libgphoto2, especially those in environments where untrusted cameras or USB devices may be connected, should assess exposure and prioritize mitigation.
Why it matters
Defenders should care about CVE-2026-138158 because it allows malicious devices to potentially cause system crashes or code execution through a stack buffer overflow in libgphoto2. This vulnerability is particularly relevant for environments where untrusted cameras or USB devices may be connected. The impact is supported by the CVE record and source item, but additional details on exploitation or victims are limited.
- Potential for system crashes due to buffer overflow
- Possible code execution through malicious device interactions
- Need for verification of affected versions and device connections
- Priority for patching or mitigating the vulnerability
Technical summary
The sierra_get_string_register() function in libgphoto2 through 2.5.34 is vulnerable to a stack buffer overflow. This occurs when a malicious sierra-protocol camera or USB device responds to a file-name register query with an oversized packet, allowing it to write up to 32 KB past small stack buffers, potentially causing crashes or code execution. The issue arises when listing files, and defenders should prioritize patching or mitigating this vulnerability, especially in environments where untrusted devices may be connected.
Defensive priority
Defenders should prioritize patching or mitigating this vulnerability, especially in environments where untrusted devices may be connected.
Recommended defensive actions
- Patch libgphoto2 to version greater than 2.5.34
- Implement controls to restrict connections to trusted devices
- Monitor for suspicious activity related to sierra-protocol cameras or USB devices
- Review compensating controls for exposed systems while remediation is scheduled and verified
- Check relevant monitoring, detection, and logs for exposed assets that need extra review
- Track exceptions, retest remediated assets, and close the item only after evidence is documented
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
Evidence notes
The CVE record and source item provide details on the vulnerability, including its description and affected versions. However, additional information on exploitation or impact is limited. Defenders should verify affected versions, device connections, and assess exposure in their environments. Limited source details are available for further analysis.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-138158 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-138158
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-138158 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-138158
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()
Unverified legacy reference
URL: https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/138xxx/CVE-2026-138158.json
cve_program_cvelist_v5
-
Source reference
Unverified legacy reference
URL: https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3a
Supplemental source - patch
-
Source reference
Unverified legacy reference
URL: https://github.com/gphoto/libgphoto2/blob/v2.5.34/camlibs/sierra/library.c
Supplemental source - technical-description
-
Source reference
Unverified legacy reference
URL: https://github.com/gphoto/libgphoto2
Supplemental source - product
-
Source reference
Unverified legacy reference
URL: https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-stack-buffer-overflow-via-sierra-get-string-register
Supplemental source - third-party-advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.