CVE-2026-120452libgphoto2 through 2.5.34 Heap Out-of-Bounds Read/Write via jl2005c Thumbnail Conversion
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.
What to do
Fixed builds are available from Ubuntu: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libgphoto2 | Fixed | 2.5.33-1ubuntu2.1 | UBUNTU-CVE-2026-120452 |
| Ubuntu 26.04 | libgphoto2 | Fixed | 2.5.33-1ubuntu1.2 | UBUNTU-CVE-2026-120452 |
| Ubuntu 24.04 | libgphoto2 | Fixed | 2.5.31-2.1ubuntu1.2 | UBUNTU-CVE-2026-120452 |
| Ubuntu 22.04 | libgphoto2 | Fixed | 2.5.27-1ubuntu0.2 | UBUNTU-CVE-2026-120452 |
| Ubuntu 20.04 | libgphoto2 | Fix pending | 2.5.25-0ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-120452 |
| Ubuntu 18.04 | libgphoto2 | Fix pending | 2.5.16-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-120452 |
| Ubuntu 16.04 | libgphoto2 | Fix pending | 2.5.9-3ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-120452 |
| Ubuntu 14.04 | libgphoto2 | Fix pending | 2.5.3.1-1ubuntu2.2+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-120452 |
| Debian 14 | libgphoto2 | Fix pending | DEBIAN-CVE-2026-120452 | |
| Debian 13 | libgphoto2 | Fix pending | DEBIAN-CVE-2026-120452 | |
| Debian 12 | libgphoto2 | Fix pending | DEBIAN-CVE-2026-120452 | |
| Red Hat Enterprise Linux 10 | libgphoto2 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | libgphoto2-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | libgphoto2 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | libgphoto2-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libgphoto2 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | libgphoto2-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | libgphoto2 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | libgphoto2-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libgphoto2 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libgphoto2-devel | Will not fix Out of support scope |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- gPhoto libgphoto2: affected: up to 2.5.34
Vendor advisories:
- https://github.com/gphoto/libgphoto2/commit/af3b8e9c542cda863fb5f2f3cfeb261bd78e4442 (patch)
- https://github.com/gphoto/libgphoto2/commit/30bf7ace6d47cfe1232ea73bde2aceb95aba4bfb (patch)
References
- https://github.com/gphoto/libgphoto2/issues/1326
- https://github.com/gphoto/libgphoto2/commit/af3b8e9c542cda863fb5f2f3cfeb261bd78e4442
- https://github.com/gphoto/libgphoto2/commit/30bf7ace6d47cfe1232ea73bde2aceb95aba4bfb
- https://github.com/gphoto/libgphoto2/blob/v2.5.34/camlibs/jl2005c/jl2005bcd_decompress.c#L127-L130
- https://hackmd.io/@haindpwn/libgphoto2-jl2005c-init-alloc-table-buffer-overflow
- https://www.vulncheck.com/advisories/libgphoto2-through-2.5.34-heap-out-of-bounds-read-write-via-jl2005c-thumbnail-conversion
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.