CVE-2026-40335
Received Received - Intake
Out-of-Bounds Read in libgphoto2 ptp_unpack_DPV Function

Publication date: 2026-04-18

Last updated on: 2026-04-18

Assigner: GitHub, Inc.

Description
libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in `ptp_unpack_DPV()` in `camlibs/ptp2/ptp-pack.c` (lines 622–629). The UINT128 and INT128 cases advance `*offset += 16` without verifying that 16 bytes remain in the buffer. The entry check at line 609 only guarantees `*offset < total` (at least 1 byte available), leaving up to 15 bytes unvalidated. Commit 433bde9888d70aa726e32744cd751d7dbe94379a patches the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-18
Last Modified
2026-04-18
Generated
2026-05-06
AI Q&A
2026-04-18
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
libgphoto2 libgphoto2 to 2.5.33 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in libgphoto2, a camera access and control library, in versions up to and including 2.5.33. It is an out-of-bounds read issue in the function ptp_unpack_DPV() located in camlibs/ptp2/ptp-pack.c. Specifically, when handling UINT128 and INT128 data types, the code advances the offset by 16 bytes without verifying that 16 bytes remain in the buffer. The initial check only ensures that at least 1 byte is available, which can leave up to 15 bytes unvalidated, potentially causing the program to read beyond the buffer boundary.


How can this vulnerability impact me? :

The vulnerability can lead to an out-of-bounds read, which may cause a partial denial of service (application crash) or expose sensitive information from adjacent memory. According to the CVSS score (5.2), the impact includes high confidentiality impact and low availability impact, with no integrity impact.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update libgphoto2 to a version later than 2.5.33 where the issue has been patched (commit 433bde9888d70aa726e32744cd751d7dbe94379a).


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart