CVE-2026-40333: CWE-125: Out-of-bounds Read in gphoto libgphoto2
libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.
AI Analysis
Technical Summary
libgphoto2, a camera access and control library, contains an out-of-bounds read vulnerability (CWE-125) in versions up to 2.5.33. Specifically, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but lack a length parameter, leading to unbounded reads. The callers in ptp_unpack_EOS_events() have access to the buffer size (xsize) but do not pass it to these functions, resulting in no validation against buffer boundaries. This can cause reading beyond the intended memory, potentially leading to confidentiality loss and denial of service. The issue is addressed in commit 1817ecead20c2aafa7549dac9619fe38f47b2f53. The CVSS 3.1 base score is 6.1 (AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H), indicating a medium severity vulnerability exploitable remotely over a physical network without privileges or user interaction.
Potential Impact
The vulnerability allows an attacker with physical network access to trigger out-of-bounds reads in libgphoto2, potentially leading to disclosure of sensitive information (confidentiality impact) and denial of service (availability impact). There is no indication of integrity impact. No known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix for this vulnerability has been committed (commit 1817ecead20c2aafa7549dac9619fe38f47b2f53), but no official patch release or vendor advisory is currently available. Users should monitor the official gphoto project for updated releases containing this fix and apply them promptly once available. Until then, cautious handling of untrusted data with libgphoto2 is advised. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
CVE-2026-40333: CWE-125: Out-of-bounds Read in gphoto libgphoto2
Description
libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.
CVSS v3.1
Score 6.1medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
libgphoto2, a camera access and control library, contains an out-of-bounds read vulnerability (CWE-125) in versions up to 2.5.33. Specifically, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but lack a length parameter, leading to unbounded reads. The callers in ptp_unpack_EOS_events() have access to the buffer size (xsize) but do not pass it to these functions, resulting in no validation against buffer boundaries. This can cause reading beyond the intended memory, potentially leading to confidentiality loss and denial of service. The issue is addressed in commit 1817ecead20c2aafa7549dac9619fe38f47b2f53. The CVSS 3.1 base score is 6.1 (AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H), indicating a medium severity vulnerability exploitable remotely over a physical network without privileges or user interaction.
Potential Impact
The vulnerability allows an attacker with physical network access to trigger out-of-bounds reads in libgphoto2, potentially leading to disclosure of sensitive information (confidentiality impact) and denial of service (availability impact). There is no indication of integrity impact. No known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix for this vulnerability has been committed (commit 1817ecead20c2aafa7549dac9619fe38f47b2f53), but no official patch release or vendor advisory is currently available. Users should monitor the official gphoto project for updated releases containing this fix and apply them promptly once available. Until then, cautious handling of untrusted data with libgphoto2 is advised. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-10T22:50:01.357Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69e2c0dabdfbbecc599fc04c
Added to database: 4/17/2026, 11:23:06 PM
Last enriched: 4/25/2026, 2:56:26 AM
Last updated: 6/2/2026, 10:20:55 AM
Views: 80
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.