{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2026-40338","published":"2026-04-18T00:16:37.810000Z","last_modified":"2026-10-26T22:10:00.163000Z","status":"Deferred","cvss":{"version":"3.1","score":5.2,"severity":"MEDIUM","vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L","source":"security-advisories@github.com","primary":false},"auth":true,"cwes":["CWE-125"],"cpes":[],"cpes_truncated":false,"vendors":["gphoto"],"products":["gphoto/libgphoto2"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial"},"cat":"app","platform":"multi","eol":false,"packages":[],"severity":"medium","priority_score":31,"links":{"html_es":"/es/cve/CVE-2026-40338/","html_en":"/en/cve/CVE-2026-40338/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-40338","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-40338"},"untrusted":{"vendor_name":"gphoto","product_name":"libgphoto2","desc_en":"libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in the PTP_DPFF_Enumeration case of `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 856). The function reads a 2-byte enumeration count N via `dtoh16o(data, *poffset)` without verifying that 2 bytes remain in the buffer. The standard `ptp_unpack_DPD()` at line 704 has this exact check, confirming the Sony variant omitted it by oversight. Commit 3b9f9696be76ae51dca983d9dd8ce586a2561845 fixes the issue.","affected":[{"untrusted_vendor":"gphoto","untrusted_product":"libgphoto2","versions":[]}],"references":[{"url":"https://github.com/gphoto/libgphoto2/commit/3b9f9696be76ae51dca983d9dd8ce586a2561845","tags":[]},{"url":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-2hwp-w84q-27hf","tags":[]}]},"bulletins":[{"source":"suse","id":"openSUSE-SU-2026:10916-1","url":"https://www.suse.com/support/update/","published":"2026-05-31T00:00:00+00:00","severity":"medium","exploited":false,"untrusted":{"title":"libgphoto2-6-2.5.34-1.1 on GA media"}}]}