The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40336

CVE-2026-40336: libgphoto2 Information Disclosure Flaw

CVE-2026-40336 is an information disclosure vulnerability in libgphoto2 affecting versions up to 2.5.33. A memory leak in Sony camera processing can expose sensitive data. This article covers technical details, affected versions, impact, and mitigation.

Published: April 23, 2026

CVE-2026-40336 Overview

CVE-2026-40336 is a memory leak vulnerability in libgphoto2, a camera access and control library. The vulnerability exists in the ptp_unpack_Sony_DPD() function located 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() allocation without first freeing the previous allocation from line 857. This causes the original array and any string values it contains to be leaked on every property descriptor parse.

Critical Impact

Repeated memory leaks during property descriptor parsing can lead to resource exhaustion and denial of service conditions when interacting with affected Sony cameras.

Affected Products

  • libgphoto2 versions up to and including 2.5.33
  • Systems using libgphoto2 with 2024+ Sony cameras that utilize secondary enumeration lists
  • Applications integrating libgphoto2 for camera control functionality

Discovery Timeline

  • 2026-04-18 - CVE CVE-2026-40336 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-40336

Vulnerability Analysis

This vulnerability is classified as CWE-401 (Missing Release of Memory after Effective Lifetime), a memory leak issue that occurs during the parsing of Picture Transfer Protocol (PTP) device property descriptors for Sony cameras. The vulnerability requires physical access to the system (attack vector: Physical) and does not require any privileges or user interaction to exploit. The impact is limited to availability, as the memory leak can eventually exhaust system resources.

The flaw was introduced to support secondary enumeration lists that are present in newer Sony camera models manufactured from 2024 onwards. When processing these enumeration lists, the ptp_unpack_Sony_DPD() function allocates memory using calloc() to store supported values. However, when a secondary enumeration list is encountered, the function allocates new memory and assigns it to the same pointer without releasing the previously allocated memory block.

Root Cause

The root cause is improper memory management in the ptp_unpack_Sony_DPD() function. Specifically, when processing property descriptors that contain both primary and secondary enumeration lists, the code path at lines 884–885 performs a new calloc() allocation that overwrites the pointer set at line 857. The original memory allocation is orphaned and becomes unreachable, resulting in a memory leak. Each time a property descriptor is parsed from an affected Sony camera, additional memory is leaked without being reclaimed.

Attack Vector

The attack vector requires physical access to the target system. An attacker would need to connect a malicious or specially crafted camera device to a system running libgphoto2. By repeatedly triggering property descriptor parsing operations, the attacker can cause progressive memory exhaustion. While this requires local physical access and results in relatively limited impact (availability only), it could potentially be used to destabilize systems that rely on libgphoto2 for automated camera management workflows.

The vulnerability is triggered through the PTP protocol communication path when:

  1. A Sony camera from 2024 or later is connected
  2. The camera device reports property descriptors with secondary enumeration lists
  3. The libgphoto2 library parses these descriptors using the vulnerable function

Detection Methods for CVE-2026-40336

Indicators of Compromise

  • Unexpectedly high memory usage in processes utilizing libgphoto2
  • Gradual memory consumption growth when interacting with Sony cameras
  • System instability or out-of-memory conditions during camera operations

Detection Strategies

  • Monitor memory allocation patterns in applications using libgphoto2
  • Implement memory profiling for systems with automated camera workflows
  • Check libgphoto2 version to confirm if versions 2.5.33 or earlier are in use

Monitoring Recommendations

  • Enable memory usage monitoring for services interacting with camera hardware
  • Set up alerts for abnormal memory growth patterns in camera-related processes
  • Review system logs for out-of-memory events correlated with camera activity

How to Mitigate CVE-2026-40336

Immediate Actions Required

  • Update libgphoto2 to a version containing commit 404ff02c75f3cb280196fc260a63c4d26cf1a8f6
  • Restrict physical access to systems running vulnerable libgphoto2 versions
  • Monitor memory usage on systems that cannot be immediately updated

Patch Information

The vulnerability has been fixed in commit 404ff02c75f3cb280196fc260a63c4d26cf1a8f6. Organizations should update to a version of libgphoto2 that includes this fix. The patch properly releases the previously allocated memory before assigning a new allocation, preventing the memory leak. For more details, see the GitHub Commit Update and GitHub Security Advisory GHSA-g8xw-p5wj-mrxv.

Workarounds

  • Limit USB device access to prevent untrusted camera devices from connecting
  • Implement memory limits for processes using libgphoto2 to contain resource exhaustion
  • Disable libgphoto2 functionality if not required until patching is complete
bash
# Configuration example
# Restrict USB device access using udev rules
# Create /etc/udev/rules.d/99-restrict-cameras.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", ATTR{idProduct}=="*", MODE="0600"
# Reload udev rules
sudo udevadm control --reload-rules

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechLibgphoto2

  • SeverityLOW

  • CVSS Score2.4

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-401
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-g8xw-p5wj-mrxv
  • Related CVEs
  • CVE-2026-40338: libgphoto2 Buffer Overflow Vulnerability

  • CVE-2026-40333: libgphoto2 Buffer Overflow Vulnerability

  • CVE-2026-40334: libgphoto2 Buffer Overflow Vulnerability

  • CVE-2026-40339: libgphoto2 Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English