
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40333 is an out-of-bounds read vulnerability in libgphoto2, a camera access and control library, affecting versions up to and including 2.5.33. The flaw resides in two functions within camlibs/ptp2/ptp-pack.c — ptp_unpack_EOS_ImageFormat() and ptp_unpack_EOS_CustomFuncEx() — which accept a data pointer but no length parameter, enabling unbounded memory reads. The vulnerability was published on April 17–18, 2026, and is patched via commit 1817ecead20c2aafa7549dac9619fe38f47b2f53. It carries a CVSS v3.1 base score of 6.1 (Medium) (GitHub Advisory, Red Hat).
The root cause is classified as CWE-125 (Out-of-bounds Read) and CWE-130 (Improper Handling of Length Parameter Inconsistency). Both ptp_unpack_EOS_ImageFormat() (up to 36 bytes of unbounded reads) and ptp_unpack_EOS_CustomFuncEx() (up to 1024 bytes) accept only a data pointer without a corresponding size parameter; their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving the functions unable to validate reads against the actual buffer boundary. The attack vector is physical (AV:P): an attacker must supply a malicious USB device or rogue PTP/IP server that sends a crafted EOS event response with a truncated buffer, triggering the out-of-bounds read. The fix adds a datasize parameter to both functions and validates all internal reads against it before proceeding (GitHub Advisory, Patch Commit).
Successful exploitation can expose up to 1024 bytes of adjacent heap memory, potentially disclosing sensitive in-memory data such as credentials, keys, or other application state. The ptp_unpack_EOS_CustomFuncEx() variant is the most severe due to its large potential read range. Additionally, the unbounded memory access can cause application crashes, resulting in denial-of-service conditions. Because the attack vector is physical, lateral movement risk is limited, but the confidentiality and availability impacts are rated High (GitHub Advisory, Red Hat Bugzilla).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.019%, reflecting a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Physical access to the target system is required, significantly limiting the attacker pool (GitHub Advisory, Feedly).
PTP_DPC_CANON_EOS_ImageFormat or PTP_DPC_CANON_EOS_CustomFuncEx properties.ptp_unpack_EOS_events(), which in turn invokes ptp_unpack_EOS_ImageFormat() or ptp_unpack_EOS_CustomFuncEx() with the crafted truncated buffer.ImageFormat and up to 1024 bytes for CustomFuncEx — exposing adjacent heap memory contents.ImageFormat or CustomFuncEx properties."parsing EOS ImageFormat property failed" or "customfuncex data is larger than 1k" from libgphoto2, which may indicate crafted inputs being processed.The issue is patched in commit 1817ecead20c2aafa7549dac9619fe38f47b2f53; users should update libgphoto2 to any version incorporating this commit (beyond 2.5.33). An openSUSE security announcement has also been issued, indicating downstream package updates are in progress. As a workaround, restrict physical access to systems using libgphoto2 and avoid connecting untrusted or unknown USB camera devices. Disabling PTP/IP camera access in environments where it is not required further reduces exposure (Patch Commit, Red Hat, openSUSE).
The vulnerability was reported by security researcher Sebastián Alba and disclosed via GitHub Security Advisories by maintainer msmeissn on April 15, 2026. Red Hat tracked the issue via Bugzilla (Bug 2459365) and classified it as medium severity. No significant broader media coverage or notable community debate has been observed beyond standard vulnerability tracking and downstream package update announcements (GitHub Advisory, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."