CVE-2026-138158
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-138158 NameCVE-2026-138158 Descriptionlibgphoto2 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…
CVE-2026-138158
| Name | CVE-2026-138158 |
| 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| libgphoto2 (PTS) | bookworm | 2.5.30-1 | vulnerable |
| trixie | 2.5.31-4 | vulnerable | |
| forky, sid | 2.5.34-2 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| libgphoto2 | source | (unstable) | (unfixed) | unimportant |
Notes
https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824
Fixed by: https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3a
Negligible security impact
Apply commands
https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824Fixed by: https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3aNegligible security impact
OS impact
Debian Affected 4 releases
| Version | Package | Status | Fixed in |
|---|---|---|---|
| trixie | libgphoto2 |
Affected | — |
| sid | libgphoto2 |
Affected | — |
| forky | libgphoto2 |
Affected | — |
| bookworm | libgphoto2 |
Affected | — |
SUSE Tracked 1 release
| Version | Package | Status | Fixed in |
|---|---|---|---|
| — | — | Unknown | — |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| gphoto | libgphoto2 | {"endIncluding":"2.5.34"} | |
References
- https://github.com/gphoto/libgphoto2
- https://github.com/gphoto/libgphoto2/blob/v2.5.34/camlibs/sierra/library.c#L1285-L1289
- https://github.com/gphoto/libgphoto2/commit/c4cd525d7461c26b89b4705dc74fc4b84d57ff3a
- https://github.com/gphoto/libgphoto2/security/advisories/GHSA-4f44-frcc-8824
- https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-stack-buffer-overflow-via-sierra-get-string-register
- https://security-tracker.debian.org/tracker/CVE-2026-138158
- https://www.suse.com/security/cve/CVE-2026-138158.html
CWEs
CWE-121
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.