Out-of-bounds readin gPhoto libgphoto2.
No public exploit found; not on exploited lists.
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 to 563). The function validates `len < PTP_oi_SequenceNumber` (i.e., len < 48) but subsequently accesses offsets 48 to 56, up to 9 bytes beyond the validated boundary, via the Samsung Galaxy 64-bit objectsize detection heuristic. Commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33 fixes the issue.
- No source names a fix yet. Watch this page or the product for updates; we never guess a fixed version.
Not confirmed by any source yet: fixed version not confirmed. We show these as not confirmed instead of guessing.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 10 Apr 2026CVE ID reserved by GitHub_M.
- 17 Apr 2026Published in the CVE List.
- 20 Apr 2026CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other libgphoto2 vulnerabilities
Same weakness: Out-of-bounds read
- github.com x_refsource_CONFIRM
- github.com x_refsource_MISC
Patchminder. CVE-2026-40340: Out-of-bounds read in gPhoto libgphoto2. https://patchminder.com/cve/cve-2026-40340/ (accessed 5 December 2026).