A vulnerability was found in gphoto libgphoto2 up to 2.5.33. It has been classified as critical. The impacted element is the function ptp_unpack_DPV of the file camlibs/ptp2/ptp-pack.c. Performing a manipulation results in out-of-bounds read.

This vulnerability is reported as CVE-2026-40335. The attack may be carried out on the physical device. No exploit exists.

Upgrading the affected component is recommended.