Out-of-Bounds Read Vulnerability in libgphoto2 Camera Access Library
CVE-2026-40335

5.2MEDIUM

Key Information:

Vendor

Gphoto

Vendor
CVE Published:
17 April 2026

What is CVE-2026-40335?

libgphoto2, a widely-used camera access and control library, has a vulnerability present in versions up to and including 2.5.33. Specifically, the ptp_unpack_DPV() function in camlibs/ptp2/ptp-pack.c does not adequately verify buffer lengths when advancing offsets, which can lead to an out-of-bounds read. This flaw arises when the UINT128 and INT128 cases increment the offset by 16 without ensuring that sufficient bytes remain in the buffer, potentially exposing the system to risks of unauthorized access or information leakage. For remediation, a security patch has been released to address this issue.

Affected Version(s)

libgphoto2 <= 2.5.33

References

CVSS V3.1

Score:
5.2
Severity:
MEDIUM
Confidentiality:
High
Integrity:
None
Availability:
High
Attack Vector:
Physical
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.