CVE Tools
Home/Vulnerability/CVE-2026-40334

CVE-2026-40334

libgphoto2 missing null termination in ptp_unpack_Canon_FE() filename buffer in ptp-pack.c

Published: Apr 17, 2026Updated: Apr 17, 2026 Sources: CVE List
3.5CVSS
LOW

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.

EPSS Score
N/A
CISA KEV
Not in KEV
Exploits
No Known Exploits
Remediation
No Fix Available

CVSS Vector Breakdown

AV:PAC:LPR:NUI:NS:UC:LI:NA:L
Exploitability
AV:PAttack Vector
Physical
AC:LAttack Complexity
Low
PR:NPrivileges Required
None
UI:NUser Interaction
None
Scope
S:UScope
Unchanged
Impact
C:LConfidentiality
Low
I:NIntegrity
None
A:LAvailability
Low

Weaknesses

Affected Products

libgphoto2
gphoto

Exploitability

No known exploits, KEV entries, or remediation guidance available for this vulnerability yet.

References

Unlock Complete Vulnerability Intelligence

Get the full picture for CVE-2026-40334 and every CVE in our database. Create a free account — no credit card required.

Create Free Account
AI-powered analysis
Plain-language impact assessment and exploitation scenario
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows