gphoto libgphoto2 up to 2.5.33 camlibs/ptp2/ptp-pack.c ptp_unpack_Canon_FE null termination

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
3.8$0-$5k3.81

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 3.9
VulDB 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): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Null termination
CWE: CWE-170 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: Yes
Local: Yes
Remote: No

Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔒

Patch: 259fc7d3bfe534ce4b114c464f55b448670ab873

Timelineinfo

04/11/2026 CVE reserved
04/18/2026 +7 days Advisory disclosed
04/18/2026 +0 days VulDB entry created
04/18/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-ph87-cc3j-c6hm
Status: Confirmed

CVE: CVE-2026-40334 (🔒)
GCVE (CVE): GCVE-0-2026-40334
GCVE (VulDB): GCVE-100-358149

Entryinfo

Created: 04/18/2026 08:52
Changes: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!