gphoto libgphoto2 up to 2.5.33 camlibs/ptp2/ptp-pack.c ptp_unpack_Canon_FE null termination
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 3.8 | $0-$5k | 3.81 |
Summary
A vulnerability, which was classified as problematic, has been found in gphoto libgphoto2 up to 2.5.33. Affected by this vulnerability is the function ptp_unpack_Canon_FE of the file camlibs/ptp2/ptp-pack.c. Performing a manipulation results in null termination.
This vulnerability is cataloged as CVE-2026-40334. The attack may be carried out on the physical device. There is no exploit available.
Applying a patch is the recommended action to fix this issue.
Details
A vulnerability, which was classified as problematic, was found in gphoto libgphoto2 up to 2.5.33. This affects the function ptp_unpack_Canon_FE of the file camlibs/ptp2/ptp-pack.c. The manipulation with an unknown input leads to a null termination vulnerability. CWE is classifying the issue as CWE-170. The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:
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.
The advisory is shared at github.com. This vulnerability is uniquely identified as CVE-2026-40334 since 04/11/2026. The exploitability is told to be easy. An attack has to be approached locally. No form of authentication is needed for exploitation. Technical details are known, but no exploit is available.
Applying the patch 259fc7d3bfe534ce4b114c464f55b448670ab873 is able to eliminate this problem. The bugfix is ready for download at github.com.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Product
Vendor
Name
Version
- 2.5.0
- 2.5.1
- 2.5.2
- 2.5.3
- 2.5.4
- 2.5.5
- 2.5.6
- 2.5.7
- 2.5.8
- 2.5.9
- 2.5.10
- 2.5.11
- 2.5.12
- 2.5.13
- 2.5.14
- 2.5.15
- 2.5.16
- 2.5.17
- 2.5.18
- 2.5.19
- 2.5.20
- 2.5.21
- 2.5.22
- 2.5.23
- 2.5.24
- 2.5.25
- 2.5.26
- 2.5.27
- 2.5.28
- 2.5.29
- 2.5.30
- 2.5.31
- 2.5.32
- 2.5.33
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 3.9VulDB Meta Temp Score: 3.8
VulDB Base Score: 4.3
VulDB Temp Score: 4.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 3.5
CNA Vector (GitHub_M): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Null terminationCWE: CWE-170 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: Yes
Local: Yes
Remote: No
Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
0-Day Time: 🔒
Patch: 259fc7d3bfe534ce4b114c464f55b448670ab873
Timeline
04/11/2026 CVE reserved04/18/2026 Advisory disclosed
04/18/2026 VulDB entry created
04/18/2026 VulDB entry last update
Sources
Product: github.comAdvisory: GHSA-ph87-cc3j-c6hm
Status: Confirmed
CVE: CVE-2026-40334 (🔒)
GCVE (CVE): GCVE-0-2026-40334
GCVE (VulDB): GCVE-100-358149
Entry
Created: 04/18/2026 08:52Changes: 04/18/2026 08:52 (66)
Complete: 🔍
Cache ID: 216::103
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
No comments yet. Languages: en.
Please log in to comment.