gphoto libgphoto2 up to 2.5.33 camlibs/ptp2/ptp-pack.c ptp_unpack_EOS_events length out-of-bounds

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.
5.1$0-$5k4.49-

Summaryinfo

A vulnerability was found in gphoto libgphoto2 up to 2.5.33. It has been rated as critical. The affected element is the function ptp_unpack_EOS_events of the file camlibs/ptp2/ptp-pack.c. Performing a manipulation of the argument length results in out-of-bounds. This vulnerability is known as CVE-2026-40333. The attack may be carried out on the physical device. No exploit is available. To fix this issue, it is recommended to deploy a patch.

Detailsinfo

A vulnerability classified as critical has been found in gphoto libgphoto2 up to 2.5.33. This affects the function ptp_unpack_EOS_events of the file camlibs/ptp2/ptp-pack.c. The manipulation of the argument length with an unknown input leads to a out-of-bounds vulnerability. CWE is classifying the issue as CWE-125. The product reads data past the end, or before the beginning, of the intended buffer. 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, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.

It is possible to read the advisory at github.com. This vulnerability is uniquely identified as CVE-2026-40333 since 04/11/2026. The exploitability is told to be easy. Attacking locally is a requirement. No form of authentication is needed for exploitation. Technical details of the vulnerability are known, but there is no available exploit.

The vulnerability scanner Nessus provides a plugin with the ID 307447 (Linux Distros Unpatched Vulnerability : CVE-2026-40333), which helps to determine the existence of the flaw in a target environment.

Applying the patch 1817ecead20c2aafa7549dac9619fe38f47b2f53 is able to eliminate this problem. The bugfix is ready for download at github.com.

The vulnerability is also documented in the databases at Tenable (307447) and EUVD (EUVD-2026-23581). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.2
VulDB Meta Temp Score: 5.1

VulDB Base Score: 4.3
VulDB Temp Score: 4.1
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 6.1
CNA Vector (GitHub_M): 🔒

CVSSv2info

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

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

Exploitinginfo

Class: Out-of-bounds
CWE: CWE-125 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: Yes
Local: Yes
Remote: No

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

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 307447
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-40333

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔒

Patch: 1817ecead20c2aafa7549dac9619fe38f47b2f53

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-hq94-cp6h-3gjp
Status: Confirmed

CVE: CVE-2026-40333 (🔒)
GCVE (CVE): GCVE-0-2026-40333
GCVE (VulDB): GCVE-100-358155
EUVD: 🔒

Entryinfo

Created: 04/18/2026 08:56
Updated: 04/18/2026 23:15
Changes: 04/18/2026 08:56 (68), 04/18/2026 18:57 (1), 04/18/2026 23:15 (2)
Complete: 🔍
Cache ID: 216::103

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!