CyberIntel ⬡ News
★ Saved ◆ Cyber Reads
← Back ⬡ Vulnerabilities & CVEs Apr 18, 2026

CVE-2026-40335 | gphoto libgphoto2 up to 2.5.33 camlibs/ptp2/ptp-pack.c ptp_unpack_DPV out-of-bounds (GHSA-g4g5-c2x9-cqfj)

VulDB Archived Apr 18, 2026 ✓ Full text saved

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.

Full text archived locally
✦ AI Summary · Claude Sonnet


    VDB-358168 · CVE-2026-40335 · GHSA-G4G5-C2X9-CQFJ GPHOTO LIBGPHOTO2 UP TO 2.5.33 CAMLIBS/PTP2/PTP-PACK.C PTP_UNPACK_DPV OUT-OF-BOUNDS HISTORYDIFFRELATEJSONXMLCTI CVSS Meta Temp Score Current Exploit Price (≈) CTI Interest Score 4.6 $0-$5k 2.67+ Summaryinfo A vulnerability was found in gphoto libgphoto2 up to 2.5.33. It has been declared as critical. This affects the function ptp_unpack_DPV of the file camlibs/ptp2/ptp-pack.c. Executing a manipulation can lead to out-of-bounds. This vulnerability appears as CVE-2026-40335. The physical device can be targeted for the attack. There is no available exploit. It is recommended to upgrade the affected component. Detailsinfo A vulnerability has been found in gphoto libgphoto2 up to 2.5.33 and classified as critical. This vulnerability affects the function ptp_unpack_DPV of the file camlibs/ptp2/ptp-pack.c. The manipulation with an unknown input leads to a out-of-bounds vulnerability. The CWE definition for the vulnerability is CWE-125. The product reads data past the end, or before the beginning, of the intended buffer. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes: 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. The advisory is shared for download at github.com. This vulnerability was named CVE-2026-40335 since 04/11/2026. The exploitation appears to be easy. The attack needs to be approached locally. No form of authentication is required for a successful exploitation. There are known technical details, but no exploit is available. Upgrading to version 2.5.33 eliminates this vulnerability. Applying the patch 433bde9888d70aa726e32744cd751d7dbe94379a is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version. Productinfo Vendor gphoto Name libgphoto2 Version 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.18 2.5.19 2.5.20 2.5.21 2.5.22 2.5.23 2.5.24 2.5.25 2.5.26 2.5.27 2.5.28 2.5.29 2.5.30 2.5.31 2.5.32 2.5.33 License open-source Website Product: https://github.com/gphoto/libgphoto2/ CPE 2.3info 🔒 🔒 🔒 CPE 2.2info 🔒 🔒 🔒 CVSSv4info VulDB Vector: 🔒 VulDB Reliability: 🔍 CVSSv3info VulDB Meta Base Score: 4.7 VulDB Meta Temp Score: 4.6 VulDB Base Score: 4.3 VulDB Temp Score: 4.1 VulDB Vector: 🔒 VulDB Reliability: 🔍 CNA Base Score: 5.2 CNA Vector (GitHub_M): 🔒 CVSSv2info Vector Complexity Authentication Confidentiality Integrity Availability Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock VulDB Base Score: 🔒 VulDB Temp Score: 🔒 VulDB Reliability: 🔍 Exploitinginfo Class: Out-of-bounds CWE: CWE-125 / CWE-119 CAPEC: 🔒 ATT&CK: 🔒 Physical: Yes Local: Yes Remote: No Availability: 🔒 Status: Not defined Price Prediction: 🔍 Current Price Estimation: 🔒 0-Day Unlock Unlock Unlock Unlock Today Unlock Unlock Unlock Unlock Threat Intelligenceinfo Interest: 🔍 Active Actors: 🔍 Active APT Groups: 🔍 Countermeasuresinfo Recommended: Upgrade Status: 🔍 0-Day Time: 🔒 Upgrade: libgphoto2 2.5.33 Patch: 433bde9888d70aa726e32744cd751d7dbe94379a Timelineinfo 04/11/2026 CVE reserved 04/18/2026 +7 days Advisory disclosed 04/18/2026 +0 days VulDB entry created 04/18/2026 +0 days VulDB entry last update Sourcesinfo Product: github.com Advisory: GHSA-g4g5-c2x9-cqfj Status: Confirmed CVE: CVE-2026-40335 (🔒) GCVE (CVE): GCVE-0-2026-40335 GCVE (VulDB): GCVE-100-358168 Entryinfo Created: 04/18/2026 09:02 Changes: 04/18/2026 09:02 (68) Complete: 🔍 Cache ID: 99:4E8:101 Discussion No comments yet. Languages: en. Please log in to comment. ◂ PreviousOverviewNext ▸
    💬 Team Notes
    Article Info
    Source
    VulDB
    Category
    ⬡ Vulnerabilities & CVEs
    Published
    Apr 18, 2026
    Archived
    Apr 18, 2026
    Full Text
    ✓ Saved locally
    Open Original ↗