DEBIAN-CVE-2026-40340

Source
https://security-tracker.debian.org/tracker/CVE-2026-40340
Import Source
https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40340.json
JSON Data
https://api.osv.dev/v1/vulns/DEBIAN-CVE-2026-40340
Upstream
Published
2026-04-18T00:16:38Z
Modified
2026-09-14T17:03:32Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H CVSS Calculator
Summary
[none]
Details

libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read vulnerability in ptp_unpack_OI() in camlibs/ptp2/ptp-pack.c (lines 530–563). The function validates len < PTP_oi_SequenceNumber (i.e., len < 48) but subsequently accesses offsets 48–56, up to 9 bytes beyond the validated boundary, via the Samsung Galaxy 64-bit objectsize detection heuristic. Commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33 fixes the issue.

References

Affected packages

Debian:12 / libgphoto2

Package

Name
libgphoto2
Purl
pkg:deb/debian/libgphoto2?arch=source&distro=bookworm

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.5.30-1
2.5.31-1
2.5.31-2
2.5.31-2.1~exp1
2.5.31-2.1
2.5.31-3
2.5.31-4
2.5.32-1
2.5.33-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40340.json"

Debian:13 / libgphoto2

Package

Name
libgphoto2
Purl
pkg:deb/debian/libgphoto2?arch=source&distro=trixie

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.5.31-4
2.5.32-1
2.5.33-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40340.json"

Debian:14 / libgphoto2

Package

Name
libgphoto2
Purl
pkg:deb/debian/libgphoto2?arch=source&distro=forky

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2.*
2.5.31-4
2.5.32-1
2.5.33-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Database specific

source
"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40340.json"