Skip to main content

Samsung CVE-2026-40340

MEDIUM
Out-of-bounds Read (CWE-125)
2026-04-18 security-advisories@github.com
6.1
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Connect malicious USB device as PTP camera
  2. Delivery
    libgphoto2 enumerates device automatically
  3. Exploit
    Call ptp_unpack_OI() with crafted ObjectInfo response
  4. Execution
    Pass length validation (len < 48)
  5. Persist
    Access memory offsets 48-56 beyond boundary
  6. Impact
    Read uninitialized/sensitive heap memory or crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires physical USB access to a computer running libgphoto2 (or an application using libgphoto2) and the ability to connect a malicious device or compromise a legitimate PTP camera to transmit crafted protocol responses. The vulnerability is triggered only when libgphoto2 processes PTP ObjectInfo responses with specific length values that pass the len < 48 validation but trigger the Samsung Galaxy 64-bit size detection heuristic, which then accesses memory beyond byte 48. The vulnerability does not require user authentication, elevated privileges, or user interaction beyond connecting the device. Non-default configuration is NOT required; the vulnerability affects default PTP camera enumeration behavior. The primary limiting factor is the mandatory physical USB access requirement; remote network-based exploitation is not possible since libgphoto2 communicates directly with local USB devices.

Impact

The CVSS score of 6.1 with physical attack vector (AV:P) reflects the requirement for direct USB-connected camera access, significantly limiting real-world exploitability in most enterprise and consumer environments. The CVSS vector shows high confidentiality impact (C:H) and high availability impact (A:H), but no integrity impact (I:N), indicating the vulnerability enables information disclosure and crash-based denial of service only. EPSS data is not provided, preventing probabilistic exploitation assessment. No KEV listing or public exploit code is evident from available data, suggesting limited active exploitation despite the vulnerability's technical clarity. The attack complexity is low (AC:L) once physical access is obtained, but the physical access requirement itself is a substantial real-world barrier. For security teams, the primary risk is to specialized users operating tethered cameras (photographers, developers, embedded imaging systems) rather than general network-facing deployments. The vulnerability is actionable but not critical for most organizations due to access constraints.

Exploit ScenarioDerived

An attacker with physical access to a workstation connects a malicious or specially crafted USB device that emulates a Samsung Galaxy PTP camera. When libgphoto2 enumerates the device and calls ptp_unpack_OI() to parse the device's ObjectInfo response, the crafted response contains a length value that passes the boundary check but includes malformed data at offsets 48-56. The library reads beyond the validated buffer boundary, leaking sensitive memory contents to the attacker or causing the library to crash, disrupting camera access functionality.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 18, 2026

Out-of-bounds read in libgphoto2 versions up to 2.5.33 allows local attackers with physical access to a USB-connected camera to trigger information disclosure or denial of service via malformed PTP protocol data during Samsung Galaxy device enumeration. The vulnerability exists in ptp_unpack_OI() which validates buffer boundaries at 48 bytes but subsequently reads up to 56 bytes, exceeding the boundary by 9 bytes. A fix is available in commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33.

RemediationAI

Upgrade libgphoto2 to a version incorporating commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33 or later. Check your distribution's package repository for patched versions (e.g., apt update && apt install libgphoto2-6 on Debian/Ubuntu systems after the patch is released). If immediate patching is not possible, implement compensating controls: restrict physical USB access to trusted devices only via hardware locks or connection policies, disable automatic camera detection/mounting when untrusted devices may be connected, or operate libgphoto2-dependent tools in isolated or sandboxed environments to limit information disclosure scope. The GitHub Security Advisory (GHSA-xfw3-xvjp-5wcv) provides additional context. Note that this vulnerability requires active connection to a malicious or compromised camera, so network-only deployments are unaffected.

Affected ProductsAI

libgphoto2 versions 2.5.33 and earlier are affected. The vulnerability specifically impacts the PTP camera library component (camlibs/ptp2/ptp-pack.c) used when communicating with Samsung Galaxy devices and potentially other PTP-compliant cameras. The fix is available in upstream commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33. GitHub Security Advisory GHSA-xfw3-xvjp-5wcv provides official vulnerability disclosure.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libgphoto2 is a camera access library that communicates with digital cameras using the Picture Transfer Protocol (PTP). The vulnerability resides in the PTP unpacking routine ptp_unpack_OI() in camlibs/ptp2/ptp-pack.c (lines 530-563), which deserializes camera ObjectInfo responses. The function implements a Samsung Galaxy-specific 64-bit object size detection heuristic that causes it to read beyond validated memory boundaries. The root cause is an out-of-bounds read (CWE-125) where the function checks if len < PTP_oi_SequenceNumber (48 bytes) but then accesses memory offsets 48-56, reading 9 bytes beyond the validated boundary. This occurs when processing malformed or adversarial PTP protocol responses from a connected camera device.

Know when Samsung gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 6.1 MEDIUM
AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
SUSE MEDIUM
Red Hat 6.1 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch released
Apr 28, 2026 - 20:30 nvd
Patch available
CVE Published
Apr 18, 2026 - 00:16 nvd
MEDIUM 6.1

DescriptionCVE.org

libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read vulnerability in ptp_unpack_OI() in camlibs/ptp2/ptp-pack.c (lines 530-563). The function validates len < PTP_oi_SequenceNumber (i.e., len < 48) but subsequently accesses offsets 48-56, up to 9 bytes beyond the validated boundary, via the Samsung Galaxy 64-bit objectsize detection heuristic. Commit 7c7f515bc88c3d0c4098ac965d313518e0ccbe33 fixes the issue.

Threat Intelligence Overview

EPSS Score
0.0%
Top 100% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2024-7399 CRITICAL POC
9.8 Aug 12

Remote, unauthenticated attackers can write files of their choosing with system-level authority on Samsung MagicINFO 9 S

CVE-2025-4632 CRITICAL POC
9.8 May 13

Samsung MagicINFO 9 Server contains a path traversal vulnerability allowing unauthenticated attackers to write arbitrary

CVE-2012-4333 CRITICAL POC
10.0 Aug 14

Multiple stack-based buffer overflows in the BackupToAvi method in the (1) UMS_Ctrl 1.5.1.1 and (2) UMS_Ctrl_STW 2.0.1.0

CVE-2017-16524 HIGH POC
8.8 Nov 06

Web Viewer 1.0.0.193 on Samsung SRN-1670D devices suffers from an Unrestricted file upload vulnerability: 'network_ssl_u

CVE-2015-8279 HIGH POC
8.6 Jan 15

Web Viewer 1.0.0.193 on Samsung SRN-1670D devices allows remote attackers to read arbitrary files via a request to an un

CVE-2016-0998 HIGH POC
8.8 Mar 12

Use-after-free vulnerability in Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows

CVE-2016-0999 HIGH POC
8.8 Mar 12

Use-after-free vulnerability in Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows

CVE-2016-0997 HIGH POC
8.8 Mar 12

Use-after-free vulnerability in Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows

CVE-2016-1000 HIGH POC
8.8 Mar 12

Use-after-free vulnerability in Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows

CVE-2017-17692 HIGH POC
7.5 Dec 21

Samsung Internet Browser 5.4.02.3 allows remote attackers to bypass the Same Origin Policy and obtain sensitive informat

CVE-2016-1002 HIGH POC
8.8 Mar 12

Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows and OS X and before 11.2.202.577

CVE-2016-1010 HIGH
8.8 Mar 12

Integer overflow in Adobe Flash Player before 18.0.0.333 and 19.x through 21.x before 21.0.0.182 on Windows and OS X and

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Desktop Applications 15 SP7 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy