Buffer Overflow Vulnerability in libgphoto2 Camera Control Library
CVE-2026-40334

3.5LOW

Key Information:

Vendor

Gphoto

Vendor
CVE Published:
17 April 2026

What is CVE-2026-40334?

The libgphoto2 library, used for camera access and control, contains a vulnerability due to a missing null terminator in the ptp_unpack_Canon_FE() function. This flaw occurs when filenames are copied into a fixed-size buffer without properly terminating the string. If the source filename precisely matches the buffer length of 13 bytes and lacks a null terminator, it can lead to out-of-bounds memory access during subsequent operations. This can potentially enable attackers to exploit the vulnerability for unauthorized access or execute arbitrary code. The issue was addressed in a patch (commit 259fc7d3bfe534ce4b114c464f55b448670ab873) that ensures proper null termination, thereby mitigating the associated risks.

Affected Version(s)

libgphoto2 <= 2.5.33

References

CVSS V3.1

Score:
3.5
Severity:
LOW
Confidentiality:
Low
Integrity:
None
Availability:
Low
Attack Vector:
Physical
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.