Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-40339

published medium CVSS 3.1 · 5.2

libgphoto2 has OOB read in ptp_unpack_Sony_DPD() FormFlag parsing in ptp-pack.c

Published
17 Apr 2026, 23:42:32 UTC
Updated
20 Apr 2026, 14:56:21 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
gphoto — libgphoto2<= 2.5.33 Affected Not stated GitHub_M
Amazon Linux AL2 Release evaluation No Fix Planned Not stated Amazon Linux assessment
Ubuntu jammy libgphoto2 Advisory build 2.5.27-1ubuntu0.1 USN-8586-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6aarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
Ubuntu noble libgphoto2 Advisory build 2.5.31-2.1ubuntu1.1 USN-8586-1
Ubuntu resolute libgphoto2 Advisory build 2.5.33-1ubuntu1.1 USN-8586-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6ppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6s390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
Show 42 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6x86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-32bitaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-32bitppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-32bits390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-32bitx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-langaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-langppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-langs390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-6-langx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-develaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-develppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devels390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-develx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-32bitaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-32bitppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-32bits390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-32bitx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-docaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-docppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-docs390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-devel-docx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-docaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-docppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-docs390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2-docx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12aarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12ppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12s390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12x86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12-32bitaarch64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12-32bitppc64le Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12-32bits390x Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
SUSE / openSUSE openSUSE-Tumbleweed libgphoto2_port12-32bitx86_64 Advisory build 2.5.34-1.1 OPENSUSE-SU-2026:10916-1
Ubuntu jammy libgphoto2-6 Advisory build 2.5.27-1ubuntu0.1 USN-8586-1
Ubuntu jammy libgphoto2-l10n Advisory build 2.5.27-1ubuntu0.1 USN-8586-1
Ubuntu jammy libgphoto2-port12 Advisory build 2.5.27-1ubuntu0.1 USN-8586-1
Ubuntu noble libgphoto2-6t64 Advisory build 2.5.31-2.1ubuntu1.1 USN-8586-1
Ubuntu noble libgphoto2-l10n Advisory build 2.5.31-2.1ubuntu1.1 USN-8586-1
Ubuntu noble libgphoto2-port12t64 Advisory build 2.5.31-2.1ubuntu1.1 USN-8586-1
Ubuntu resolute libgphoto2-6t64 Advisory build 2.5.33-1ubuntu1.1 USN-8586-1
Ubuntu resolute libgphoto2-l10n Advisory build 2.5.33-1ubuntu1.1 USN-8586-1
Ubuntu resolute libgphoto2-port12t64 Advisory build 2.5.33-1ubuntu1.1 USN-8586-1

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_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 842). The function reads the FormFlag byte via `dtoh8o(data, *poffset)` without a prior bounds check. The standard `ptp_unpack_DPD()` at lines 686–687 correctly validates `*offset + sizeof(uint8_t) > dpdlen` before this same read, but the Sony variant omits this check entirely. Commit 09f8a940b1e418b5693f5c11e3016a1ad2cea62d fixes the issue.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

4

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
5.2 / 10
Severity
medium
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
gphoto libgphoto2 <= 2.5.33 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-125 CWE-125: Out-of-bounds Read (GitHub_M · cna)

References

2

Provider assertions

2

GitHub_M · cna

libgphoto2 has OOB read in ptp_unpack_Sony_DPD() FormFlag parsing in ptp-pack.c

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
c0f84c093f86b67b567708513dcba9d5eb64674308d06ff81ebbeaef6a07e1af
Ingested
23 Sep 2026, 09:13:02 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected