CVE Explorer
CVE-2026-40338
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 3b9f9696be76ae51dca983d9dd8c
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"libgphoto2","vendor":"gphoto","versions":[{"status":"affected","version":"<= 2.5.33"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:3572e2aa07f952e53ef7efbdba4c3ff707e05da7afd7262cc8c09c20512d1124 · sha256:54947853d0f8c93a… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"PHYSICAL","availabilityImpact":"LOW","baseScore":5.2,"baseSeverity":"MEDIUM","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:3572e2aa07f952e53ef7efbdba4c3ff707e05da7afd7262cc8c09c20512d1124 · sha256:54947853d0f8c93a… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
1 source assertion{"cweId":"CWE-125","description":"CWE-125: Out-of-bounds Read","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:3572e2aa07f952e53ef7efbdba4c3ff707e05da7afd7262cc8c09c20512d1124 · sha256:54947853d0f8c93a… · /containers/cna/problemTypes/0/descriptions/0
Source references
2 source assertions{"name":"https://github.com/gphoto/libgphoto2/commit/3b9f9696be76ae51dca983d9dd8ce586a2561845","tags":["x_refsource_MISC"],"url":"https://github.com/gphoto/libgphoto2/commit/3b9f9696be76ae51dca983d9dd8ce586a2561845"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:3572e2aa07f952e53ef7efbdba4c3ff707e05da7afd7262cc8c09c20512d1124 · sha256:54947853d0f8c93a… · /containers/cna/references/1
{"name":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-2hwp-w84q-27hf","tags":["x_refsource_CONFIRM"],"url":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-2hwp-w84q-27hf"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:3572e2aa07f952e53ef7efbdba4c3ff707e05da7afd7262cc8c09c20512d1124 · sha256:54947853d0f8c93a… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.