CVE-2026-40335

Publication date 18 April 2026

Last updated 16 July 2026


Ubuntu priority

Cvss 3 Severity Score

5.2 · Medium

Score breakdown

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.

Status

Package Ubuntu Release Status
libgphoto2 26.04 LTS resolute
Needs evaluation
25.10 questing Ignored end of life, was needs-triage
24.04 LTS noble
Needs evaluation
22.04 LTS jammy
Needs evaluation
20.04 LTS focal
Needs evaluation
18.04 LTS bionic
Needs evaluation
16.04 LTS xenial
Needs evaluation
14.04 LTS trusty
Needs evaluation

Patch details

For informational purposes only. We recommend not to cherry-pick updates. How can I get the fixes?

Package Patch details
libgphoto2

Severity score breakdown

CVSS version: CVSS v3.0

Base score 5.2 · Medium

Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L

References

Related Ubuntu Security Notices (USN)

    • USN-8586-1
    • libgphoto2 vulnerabilities
    • 22 July 2026

Other references


Access our resources on patching vulnerabilities