Out-of-Bounds Read Vulnerability in libgphoto2 Camera Access Library
CVE-2026-40339
5.2MEDIUM
What is CVE-2026-40339?
The libgphoto2 library, used for camera access and control, contains an out-of-bounds read vulnerability in the function ptp_unpack_Sony_DPD(). This function reads the FormFlag byte without validating the bounds, which can lead to inadvertent access of memory locations outside the intended range. The related ptp_unpack_DPD() function incorporates necessary bounds checks, but this specific variant fails to do so, exposing systems using versions up to 2.5.33 to potential risks. The issue has been addressed in commit 09f8a940b1e418b5693f5c11e3016a1ad2cea62d, providing a fix for affected versions.
Affected Version(s)
libgphoto2 <= 2.5.33
