CVE Explorer
CVE-2026-40340
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.
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:dd161fee4f0bad6fa30f270cd2b15538802d8d97275f3b48dcc341fcdbfd9988 · sha256:2572c1c0fe73a399… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"PHYSICAL","availabilityImpact":"HIGH","baseScore":6.1,"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:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:dd161fee4f0bad6fa30f270cd2b15538802d8d97275f3b48dcc341fcdbfd9988 · sha256:2572c1c0fe73a399… · /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:dd161fee4f0bad6fa30f270cd2b15538802d8d97275f3b48dcc341fcdbfd9988 · sha256:2572c1c0fe73a399… · /containers/cna/problemTypes/0/descriptions/0
Source references
2 source assertions{"name":"https://github.com/gphoto/libgphoto2/commit/7c7f515bc88c3d0c4098ac965d313518e0ccbe33","tags":["x_refsource_MISC"],"url":"https://github.com/gphoto/libgphoto2/commit/7c7f515bc88c3d0c4098ac965d313518e0ccbe33"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:dd161fee4f0bad6fa30f270cd2b15538802d8d97275f3b48dcc341fcdbfd9988 · sha256:2572c1c0fe73a399… · /containers/cna/references/1
{"name":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-xfw3-xvjp-5wcv","tags":["x_refsource_CONFIRM"],"url":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-xfw3-xvjp-5wcv"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:dd161fee4f0bad6fa30f270cd2b15538802d8d97275f3b48dcc341fcdbfd9988 · sha256:2572c1c0fe73a399… · /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.