CVE-2026-40334
libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, a missing null terminator exists in ptp_unpack_Canon_FE() in camlibs/ptp2/ptp-pack.c (line 1377). The function copies a filename into a 13-byte buffer using strncpy without explicitly null-terminating the result. If the source data is exactly 13 bytes with no null terminator, the buffer is left unterminated, leading to out-of-bounds reads in any subsequent string operation. Commit 259fc7d3bfe534ce4b114c464f55b448670ab873 patches the issue.
Scoring
- Severity
- LOW
- CVSS base score
- 3.5
- CVSS vector
- CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
- EPSS probability
- 0.19%
- CWE
- CWE-170
- Published
- 2026-04-17
- Last modified
- 2026-04-20
Affected products
- gphoto libgphoto2
Weakness type
Related vulnerabilities
- CVE-2026-73324 — VLC media player 3.0.0 through 3.0.23 Heap Out-of-Bounds Read via Unterminated RealRTSP Response Line
- CVE-2026-78506 — Microsoft Office Word Information Disclosure Vulnerability
- CVE-2026-70587 — Windows Remote Desktop Protocol Information Disclosure Vulnerability
- CVE-2026-45798 — Wazuh: Pre-auth stack-buffer-overflow in compare_wazuh_versions reachable from wazuh-authd (TCP/1515) via crafted enrollment V: field
- CVE-2026-44452 — h2o is vulnerable to heap overrun
- CVE-2026-12386 — Buffer Overflow in TUBITAK BILGEM's Pardus Pen
- CVE-2026-55738 — Stack Buffer Overflow in rxi/microtar raw_to_header() via non-null-terminated TAR name field
- CVE-2026-5067 — Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key