CVE-2026-138158

libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()

Published Nov 28, 2026 CVSS 4.0 · 7 High EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability is a stack buffer overflow located in the sierra_get_string_register() function of libgphoto2. When a device responds to a file‑listing request with an oversized packet, up to 32 KB can be written beyond the bounds of small stack buffers. This overflow can lead to a program crash or, at the very least, permit the attacker to influence program execution and potentially run arbitrary code.

Affected Systems

Affected products are the libgphoto2 library from the gphoto organization, particularly versions up through 2.5.34. Any installation of libgphoto2 that has not been updated to a later release is susceptible to this flaw.

Risk and Exploitability

The CVSS score of 7.0 indicates moderate to high severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves a malicious sierra‑protocol camera or a compromised USB device that communicates with the host using libgphoto2. If such a device is connected, the overflow can be triggered during file‑listing operations, potentially resulting in denial of service or code execution on the host system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libgphoto2 to version 2.5.35 or later to remove the vulnerable function.
  • If Sierra protocol support is unnecessary, disable it in libgphoto2 to reduce the attack surface.
  • Ensure all connected cameras and USB devices are sourced from trusted vendors and have verified firmware.

Generated by OpenCVE AI on November 28, 2026 at 03:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Gphoto
Gphoto libgphoto2
Vendors & Products Gphoto
Gphoto libgphoto2
Type Values Removed Values Added
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.
Title libgphoto2 through 2.5.34 Stack Buffer Overflow via sierra_get_string_register()
Weaknesses CWE-121
References
Metrics cvssV3_1

{'score': 6.6, 'vector': 'CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7, 'vector': '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'}

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 28, 2026, 2:21 AM
Reserved
Nov 28, 2026, 2:14 AM
Status
Received
Published
Nov 28, 2026, 3:17 AM
Modified
Nov 28, 2026, 3:17 AM