CVE-2026-138158: libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()
libgphoto2 through 2.5.34 contains a stack buffer overflow in sierragetstringregister() 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.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using libgphoto2 through 2.5.34 are exposed when they interact with a Sierra-protocol camera or USB device and list files from that device.
What does an attacker need to exploit the vulnerability?
An attacker needs to provide a malicious Sierra-protocol camera or USB device that returns an oversized response for the file-name register during file listing. The supplied vector indicates physical access and user interaction are required, while no privileges are required.