Out-of-Bounds Read Vulnerability in libgphoto2 Camera Access Library
CVE-2026-40335
5.2MEDIUM
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
