BreachSpiderVerified, not vibes

CVE-2026-40336 in Form products

Low 2.4

libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have a memory leak in `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (lines 884–885). When processing a secondary enumeration list (introduced in 2024+ Sony cameras), the function overwrites dpd->FORM.Enum.SupportedValue wit...

Affects 0 products from 3 vendors. Facts below cite their sources.

CVSS 3.12.4
EPSS0.2%
EPSS percentile6th
FixUnknown

Requires physical access, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no integrity impact.

Affected products and versions

VendorProductAffected versions
Form — —
Processing — —
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 a memory leak in `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (lines 884–885). When processing a secondary enumeration list (introduced in 2024+ Sony cameras), the function overwrites dpd->FORM.Enum.SupportedValue with a new calloc() without freeing the previous allocation from line 857. The original array and any string values it contains are leaked on every property descriptor parse. Commit 404ff02c75f3cb280196fc260a63c4d26cf1a8f6 fixes the issue.

Source: NIST NVD / MITRE CVE.

Record details

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

Weakness definitions

CWE-401: Memory Leak

Software does not release allocated memory after use, causing progressive consumption until failure.

Analysis AI-written, not human-reviewed

libgphoto2 versions up to and including 2.5.33 contain a memory leak in the ptp_unpack_Sony_DPD() function, which can lead to resource exhaustion over time.

The memory leak occurs when processing a secondary enumeration list from 2024+ Sony cameras. The function overwrites dpd->FORM.Enum.SupportedValue with a new allocation without freeing the previous one, leading to a memory leak.

Questions

What is CVE-2026-40336?

libgphoto2 versions up to and including 2.5.33 contain a memory leak in the ptp_unpack_Sony_DPD() function, which can lead to resource exhaustion over time.

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

CVE-2026-40336 has CVSS 2.4 (Low). Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. EPSS: 0.2%.

Is CVE-2026-40336 actively exploited?

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

How do I remediate CVE-2026-40336?

Priority: MEDIUM.

What systems are affected by CVE-2026-40336?

CVE-2026-40336 affects Form; Processing; 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":"Form","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-26.