BreachSpiderVerified, not vibes

CVE-2026-40339 in Sony products

Medium 5.2

libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 842). The function reads the FormFlag byte via `dtoh8o(data, *poffset)` without a prior bounds check. The standard `ptp_unpack_DPD()` at line...

Affects 0 products from 1 vendor. Facts below cite their sources.

CVSS 3.15.2
EPSS0.2%
EPSS percentile8th
FixUnknown

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

VendorProductAffected versions
Sony — —

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-exploitedNot in the CISA KEV catalog
Public exploitNot 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 `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (line 842). The function reads the FormFlag byte via `dtoh8o(data, *poffset)` without a prior bounds check. The standard `ptp_unpack_DPD()` at lines 686–687 correctly validates `*offset + sizeof(uint8_t) > dpdlen` before this same read, but the Sony variant omits this check entirely. Commit 09f8a940b1e418b5693f5c11e3016a1ad2cea62d fixes the issue.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2026-40339
BreachSpider IDBS-2026-GLOBAL-229674-M
CVSS vectorCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
Published2026-04-18
Last modified2026-10-25
Weakness (CWE)
SourceNVD

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_unpack_Sony_DPD() function, which could lead to information disclosure or other unspecified impacts.

The vulnerability arises from the lack of a bounds check when reading the FormFlag byte in the ptp_unpack_Sony_DPD() function. An attacker could exploit this by crafting a specially crafted Sony DPD response that causes the out-of-bounds read.

Questions

What is CVE-2026-40339?

libgphoto2 versions up to and including 2.5.33 contain an out-of-bounds read vulnerability in the ptp_unpack_Sony_DPD() function, which could lead to information disclosure or other unspecified impacts.

What is the CVSS score for CVE-2026-40339?

CVE-2026-40339 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-40339 actively exploited?

No confirmed active exploitation of CVE-2026-40339 as of 2026-11-03.

How do I remediate CVE-2026-40339?

Priority: MEDIUM.

What systems are affected by CVE-2026-40339?

CVE-2026-40339 affects 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":"Sony","product":"EDS-518A","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-25.