CVE-2026-40334

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

LOW
3.5
CVSS Score
Published: April 17, 2026 at 11:16 PM UTC
Updated: October 26, 2026 at 10:10 PM UTC
1 product affected across 1 vendorLIBGPHOTO2

Using libgphoto2 by gphoto?

Get instant alerts when new vulnerabilities affect libgphoto2 - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
LOW3.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

3.5LOWGitHub_M
Attack Vector
PHYSICAL
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
LOW
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-170

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card