Skip to main content

libgphoto2 CVE-2026-120452

| EUVDEUVD-2026-115212 MEDIUM
Out-of-bounds Write (CWE-787)
2026-11-02 VulnCheck GHSA-4cvw-qwj9-xjc2
5.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Connect malicious USB camera to host
  2. Delivery
    jl2005c driver initializes with crafted alloc-table values
  3. Exploit
    User triggers thumbnail/preview processing
  4. Execution
    jl2005bcd_decompress byte-swaps past buffer
  5. Impact
    Heap out-of-bounds read/write corrupts memory and leaks ~30KB into preview

Vulnerability Assessment

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

2 techniques across 2 tactics: Execution, Privilege Escalation

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

Exploitation Conditions

Requires physical/local attack via a malicious or malformed USB camera that is handled by the jl2005c camlib driver in libgphoto2 (through 2.5.34). The attacker must supply small allocation-table values (nb_entries/alloc_table_size read from the device) together with a thumbnail header byte whose width/height imply more RGB565 samples than the input payload actually contains, so in-place byte-swapping overruns the buffer by ~30 KB. Exploitation also depends on passive user interaction (UI:P): the victim must connect the device and have the application process the thumbnail/preview. LIMITING FACTORS: no network vector (AV:P physical only); the specific jl2005c driver code path must be exercised (not all cameras/apps reach it); and only software at or before 2.5.34 lacking the two added bounds checks is affected. These gates confine realistic risk to hands-on, targeted attacks despite the memory-corruption primitive.

Impact

This is a genuinely medium/low-urgency issue rather than a high-priority emergency. The CVSS 4.0 vector (AV:P/AC:L/AT:N/PR:N/UI:P, base 5.2 Medium) is the decisive signal: exploitation requires PHYSICAL attacker access via a malicious USB camera plus passive user interaction (UI:P) to trigger thumbnail/preview processing through the jl2005c camlib. There is no KEV listing and no EPSS score supplied in the input, so there is no evidence of active or widespread exploitation - the attack surface (someone must connect an attacker-controlled USB device to a host running libgphoto2) inherently limits scale to targeted, hands-on scenarios. The reported impact is a heap out-of-bounds read AND write (CWE-787), with a ~30 KB overread leaking heap contents into preview images (VC:L/VI:L) and a high availability impact (VA:H) consistent with heap corruption and crashes. A public technical write-up reference exists (hackmd) and VulnCheck published an advisory, but the input does not confirm working weaponized exploit code. The vuln.today priority label is 'this_month', not act_now/emergency, which matches the physical-access gating. Net: real and worth patching on a normal cycle, not a drop-everything network-exploitable flaw.

Exploit ScenarioDerived

An attacker crafts a malicious USB camera (or reflashes one) that the jl2005c driver recognizes, supplying small allocation-table values and a thumbnail header byte so that in-place RGB565 byte-swapping runs past the allocated buffer by roughly 30 KB. When the victim connects the device and the application generates a preview/thumbnail, libgphoto2 performs an out-of-bounds heap read and write, leaking adjacent heap contents into the preview image and corrupting memory. A public PoC reference and VulnCheck advisory describe the flaw; the input does not confirm a verified working exploit, and the physical USB vector plus required preview action (UI:P) make this a targeted, close-access scenario.

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

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

Alert me

AnalysisAIv1 – Nov 02, 2026

Heap memory corruption in libgphoto2 (through 2.5.34) lets a malicious USB camera driven by the jl2005c camlib overrun a heap buffer by roughly 30 KB during thumbnail decompression, leaking heap contents into generated preview images and allowing memory writes past the allocation. Only hosts that physically connect the crafted device and have the application process the thumbnail/preview are exposed, and the jl2005c code path must actually be reached, which keeps this a medium/low-urgency issue rather than a high-priority emergency. No public exploit code and no CISA KEV listing are confirmed in the available data, and authentication is not required (CVSS 4.0 PR:N) although the attack vector is physical (AV:P).

RemediationAI

Apply the upstream fixes, which are the only complete remedy: commit af3b8e9c542cda863fb5f2f3cfeb261bd78e4442 (thumbnail size check in jl2005bcd_decompress) and commit 30bf7ace6d47cfe1232ea73bde2aceb95aba4bfb (allocation-table size check in jl2005c_init) - note that these are upstream commits against a tree in which 2.5.34 is the newest affected release, so confirm with the vendor or your distribution which packaged version first carries both checks before treating an upgrade as fixed. Where immediate patching is not possible, the exposure is limited to the jl2005c code path, so builds and applications that omit that camlib, or that do not process thumbnails from untrusted JL2005B/C devices, do not reach the vulnerable code; the trade-off is loss of support for those cameras. Because exploitation requires attaching an attacker-controlled USB camera and having the application render the preview, restricting import stations to known-good hardware until the two bounds checks are in place is the practical interim control.

Affected VersionsENISA

libgphoto2 0 ≤2.5.34

Affected Packages

euvd libgphoto2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

libgphoto2 is the userspace camera library behind most Linux/Unix photo-import tooling; each vendor protocol lives in a camlib, and the jl2005c camlib handles USB cameras built on the JL2005B/C bridge chip (CPE: cpe:2.3:a:gphoto:libgphoto2:*:*:*:*:*:*:*:*). Two device-controlled values drive the flaw, classified as CWE-787 (out-of-bounds write) with a concurrent out-of-bounds read: jl2005c_init() reads the allocation-table size (nb_entries/alloc_table_size) from the camera without validating it against the local info buffer or priv->table, and jl2005bcd_decompress() trusts a thumbnail header byte for width/height without checking that the input actually carries 2 * width * height bytes of RGB565 data after the 16-byte header. When small allocation-table values are combined with an inflated thumbnail header, the in-place byte-swapping loop walks past the end of the buffer, reading and writing adjacent heap memory and surfacing leaked heap bytes in the resulting preview image. The upstream fix adds two bounds checks: inputsize < 16 + 2 * thumbnail_width * thumbnail_height returns GP_ERROR_CORRUPTED_DATA, and an oversized alloc_table_size relative to sizeof(info) and sizeof(priv->table) is rejected the same way.

Know when Libgphoto2 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 (VulnCheck) PRIMARY 5.2 MEDIUM
CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.4 MEDIUM

Physical USB vector (AV:P) with low complexity; no auth (PR:N) but the victim must plug in the device and trigger preview (UI:R); heap leak gives C:L/I:L and corruption gives A:H.

3.1 AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
4.0 AV:P/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Physical
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

libgphoto2 through 2.5.34 contains a heap out-of-bounds read and write vulnerability in jl2005bcd_decompress() that allows malicious USB cameras to corrupt heap memory via oversized thumbnail processing. Attackers can supply small allocation-table values and a thumbnail header byte so in-place byte-swapping exceeds the buffer by about 30 KB, leaking heap contents in preview images.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
libgphoto2 bundled in most Linux desktop distros, but vulnerable path needs jl2005c camera
Data Quality
5 sources
Confidence: Medium

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.2%
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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
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.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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