libgphoto2 is a camera access and control library.
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.
AI Analysis
Technical Summary
The libgphoto2 camera access and control library versions up to 2.5.33 have an out-of-bounds read vulnerability in the ptp_unpack_DPV() function located in camlibs/ptp2/ptp-pack.c. Specifically, the UINT128 and INT128 cases increment the offset by 16 bytes without ensuring that 16 bytes are available, as the initial check only guarantees at least one byte is available. This can lead to reading up to 15 bytes beyond the buffer boundary. The vulnerability is fixed by commit 433bde9888d70aa726e32744cd751d7dbe94379a.
Potential Impact
An out-of-bounds read can lead to information disclosure by reading memory beyond the intended buffer. According to the CVSS vector, the vulnerability requires physical access (AV:P), has low complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts confidentiality with high severity (C:H), but does not affect integrity (I:N) and only has low impact on availability (A:L). No known exploits are reported in the wild.
Mitigation Recommendations
A fix is available via commit 433bde9888d70aa726e32744cd751d7dbe94379a. Users should upgrade libgphoto2 to a version later than 2.5.33 where this issue is patched. The affected versions include multiple Ubuntu package versions up to 2.5.33-1ubuntu1. Applying the official patch or upgrading to a fixed version is recommended to remediate this vulnerability.
libgphoto2 is a camera access and control library.
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 v3.1
Score 5.2medium
Affected software
pkg:deb/ubuntu/[email protected]?arch=source&distro=trustypkg:deb/ubuntu/[email protected]?arch=source&distro=xenialpkg:deb/ubuntu/[email protected]?arch=source&distro=bionicpkg:deb/ubuntu/[email protected]?arch=source&distro=focalpkg:deb/ubuntu/[email protected]?arch=source&distro=jammypkg:deb/ubuntu/[email protected]?arch=source&distro=noblepkg:deb/ubuntu/[email protected]?arch=source&distro=questingpkg:deb/ubuntu/[email protected]?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The libgphoto2 camera access and control library versions up to 2.5.33 have an out-of-bounds read vulnerability in the ptp_unpack_DPV() function located in camlibs/ptp2/ptp-pack.c. Specifically, the UINT128 and INT128 cases increment the offset by 16 bytes without ensuring that 16 bytes are available, as the initial check only guarantees at least one byte is available. This can lead to reading up to 15 bytes beyond the buffer boundary. The vulnerability is fixed by commit 433bde9888d70aa726e32744cd751d7dbe94379a.
Potential Impact
An out-of-bounds read can lead to information disclosure by reading memory beyond the intended buffer. According to the CVSS vector, the vulnerability requires physical access (AV:P), has low complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and impacts confidentiality with high severity (C:H), but does not affect integrity (I:N) and only has low impact on availability (A:L). No known exploits are reported in the wild.
Mitigation Recommendations
A fix is available via commit 433bde9888d70aa726e32744cd751d7dbe94379a. Users should upgrade libgphoto2 to a version later than 2.5.33 where this issue is patched. The affected versions include multiple Ubuntu package versions up to 2.5.33-1ubuntu1. Applying the official patch or upgrading to a fixed version is recommended to remediate this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-40335
- Osv Schema Version
- 1.7.0
- Aliases
- []
- Ecosystems
- ["Ubuntu:14.04:LTS","Ubuntu:16.04:LTS","Ubuntu:18.04:LTS","Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:25.10","Ubuntu:26.04:LTS"]
- Database Specific Severity
- null
- Cvss Version
- 3.1
Threat ID: 6a58b4c668715ace43daac44
Added to database: 07/16/2026, 10:39:02 UTC
Last enriched: 07/16/2026, 13:20:09 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 21
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.