CVE-2026-40338 in Count products
libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in the PTP_DPFF_Enumeration case of `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 856). The function reads a 2-byte enumeration count N via `dtoh16o(data, *poffset)` without verifying that 2...
Affects 0 products from 2 vendors. Facts below cite their sources.
Requires physical access, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact.
Affected products and versions
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in the PTP_DPFF_Enumeration case of `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 856). The function reads a 2-byte enumeration count N via `dtoh16o(data, *poffset)` without verifying that 2 bytes remain in the buffer. The standard `ptp_unpack_DPD()` at line 704 has this exact check, confirming the Sony variant omitted it by oversight. Commit 3b9f9696be76ae51dca983d9dd8ce586a2561845 fixes the issue.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2026-40338 |
|---|---|
| BreachSpider ID | BS-2026-GLOBAL-229659-M |
| CVSS vector | CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L |
| Published | 2026-04-18 |
| Last modified | 2026-10-26 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-125: Out-of-Bounds Read
Software reads data past the boundary of an allocated buffer, leaking sensitive information or causing crashes.
Related attack patterns (CAPEC)
CAPEC-540 Overread Buffers via CWE-125
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
libgphoto2 versions up to and including 2.5.33 contain an out-of-bounds read vulnerability in the PTP_DPFF_Enumeration case of the ptp_unpack_Sony_DPD() function, which could lead to information disclosure or other unspecified impacts.
An attacker could exploit this vulnerability by crafting a specially crafted PTP (Picture Transfer Protocol) response that triggers the out-of-bounds read when processed by the vulnerable function in libgphoto2.
Questions
What is CVE-2026-40338?
libgphoto2 versions up to and including 2.5.33 contain an out-of-bounds read vulnerability in the PTP_DPFF_Enumeration case of the ptp_unpack_Sony_DPD() function, which could lead to information disclosure or other unspecified impacts.
What is the CVSS score for CVE-2026-40338?
CVE-2026-40338 has CVSS 5.2 (Medium). Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L. EPSS: 0.2%.
Is CVE-2026-40338 actively exploited?
No confirmed active exploitation of CVE-2026-40338 as of 2026-11-03.
How do I remediate CVE-2026-40338?
Priority: MEDIUM.
What systems are affected by CVE-2026-40338?
CVE-2026-40338 affects Count; Sony.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Count","product":"EDS-518A","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-26.