CVE-2026-40341 libgphoto2 has an OOB Read in ptp_unpack_EOS_FocusInfoEx

Low 3.5 Published Updated

An out-of-bounds read in libgphoto2 allows attackers to crash the application via malicious USB device input.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40341?

CVE-2026-40341 is a low-severity memory corruption vulnerability in libgphoto2, published on 17 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, an out of bound read in ptp_unpack_EOS_FocusInfoEx could be used to crash libgphoto2 when processing input from untrusted USB devices. Commit c385b34af260595dfbb5f9329526be5158985987 contains a patch. No known workarounds are available.

Weakness: CWE-126

Which versions are affected by CVE-2026-40341?

How do I fix CVE-2026-40341?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-40341 being exploited?

There is no known exploitation of CVE-2026-40341 in the wild and no public exploit code.

Sources

Also known as AZL-83015, DEBIAN-CVE-2026-40341, GHSA-vjx3-gjp6-r2g2, UBUNTU-CVE-2026-40341.

Is CVE-2026-40341 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free