---
id: "CVE-2026-120451"
kind: "vulnerability"
aliases: ["CVE-2026-120451"]
title: "libgphoto2: malicious USB camera overflows memory during camera setup"
severity: "high"
cvss: 7.0
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["libgphoto2", "linux", "package", "photo-tools", "usb"]
not_affected_if: ["no-jeilin-camera-driver", "no-untrusted-usb-devices"]
published_at: "2026-11-02T15:17:28+00:00"
first_seen_at: "2026-11-02T15:24:03+00:00"
updated_at: "2026-11-02T15:26:07+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120451", "first_seen_at": "2026-11-02T15:24:03+00:00"}]
---

# libgphoto2: malicious USB camera overflows memory during camera setup

libgphoto2 through 2.5.34 has stack and heap buffer overflows in its jl2005c_init() routine for Jeilin JL2005B/C/D cameras. A malicious USB device reporting 1022 or more allocation table entries can overwrite the saved return address and heap data, potentially allowing code execution.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `gphoto2 --version` or the libgphoto2 package version on the system.
- Look for libgphoto2 in application dependencies or bundled libraries, such as Linux distro packages or desktop photo tools.

## Fix

- libgphoto2: patches are linked from the sources, but the fixed version number is unknown from the sources given.

## Timeline

- 2026-11-02T15:24:03+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120451

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-buffer-overflow-via-jl2005c-camera-driver
- [fix] Patch: github.com https://github.com/gphoto/libgphoto2/commit/6a3393dd996502457ab965432cf0b2035278825e
- [fix] Patch: github.com https://github.com/gphoto/libgphoto2/commit/af3b8e9c542cda863fb5f2f3cfeb261bd78e4442

## From the sources

libgphoto2 through 2.5.34 contains stack-based and heap-based buffer overflow vulnerabilities in jl2005c_init() that allow malicious USB devices to corrupt memory by supplying an unbounded allocation table entry count. Attackers can connect a spoofed Jeilin JL2005B/C/D camera reporting 1022 or more entries to overwrite the saved return address and heap data, potentially achieving code execution.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
