CVE-2026-40334: libgphoto2 - Out of Bounds Read
- Cve: CVE-2026-40334
- Name: libgphoto2 - Out of Bounds Read
- Description: 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.
- Impact: Attackers can cause out-of-bounds reads leading to potential information disclosure or application crash.
- Remediation: Update to version including commit 259fc7d3bfe534ce4b114c464f55b448670ab873 or later.
- Vulnerability type: out_of_bounds_rw
- Vulnerability impact: information_disclosure, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: low
- Cvss 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 score: 0.00194
- Epss percentile: 0.09089
- Assignee: [email protected]
- Published at: 2026-04-18T00:16:37Z
- Age in days: 220
- Modified at: 2026-10-26T22:10:00Z
- References total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40334
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-170 | Improper Null Termination |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/gphoto/libgphoto2/commit/259fc7d3bfe534ce4b114c464f55b448670ab873 | nvd | |
| https://github.com/gphoto/libgphoto2/security/advisories/GHSA-ph87-cc3j-c6hm | nvd |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| gphoto/libgphoto2 | commit, fix, security_advisory | yes | /v1/repositories/gphoto/libgphoto2 |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts