{"id":"UBUNTU-CVE-2026-40333","details":"libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.","modified":"2026-05-20T16:25:39.691357428Z","published":"2026-04-18T00:16:00Z","upstream":["CVE-2026-40333"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-40333"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-40333"},{"type":"REPORT","url":"https://github.com/gphoto/libgphoto2/security/advisories/GHSA-hq94-cp6h-3gjp"}],"affected":[{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.2-0ubuntu5","2.5.2-0ubuntu6","2.5.3.1-0ubuntu1","2.5.3.1-1ubuntu2","2.5.3.1-1ubuntu2.2"],"ecosystem_specific":{"binaries":[{"binary_name":"libgphoto2-6","binary_version":"2.5.3.1-1ubuntu2.2"},{"binary_version":"2.5.3.1-1ubuntu2.2","binary_name":"libgphoto2-l10n"},{"binary_version":"2.5.3.1-1ubuntu2.2","binary_name":"libgphoto2-port10"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.8-1","2.5.8-2","2.5.8-3","2.5.9-2","2.5.9-3"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.9-3","binary_name":"libgphoto2-6"},{"binary_name":"libgphoto2-l10n","binary_version":"2.5.9-3"},{"binary_name":"libgphoto2-port12","binary_version":"2.5.9-3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.14-1","2.5.16-2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.16-2","binary_name":"libgphoto2-6"},{"binary_version":"2.5.16-2","binary_name":"libgphoto2-l10n"},{"binary_name":"libgphoto2-port12","binary_version":"2.5.16-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.23-2","2.5.24-1","2.5.25-0ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.25-0ubuntu0.1","binary_name":"libgphoto2-6"},{"binary_version":"2.5.25-0ubuntu0.1","binary_name":"libgphoto2-l10n"},{"binary_name":"libgphoto2-port12","binary_version":"2.5.25-0ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.27-1","2.5.27-1build1","2.5.27-1build2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.27-1build2","binary_name":"libgphoto2-6"},{"binary_version":"2.5.27-1build2","binary_name":"libgphoto2-l10n"},{"binary_version":"2.5.27-1build2","binary_name":"libgphoto2-port12"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.30-1","2.5.31-1","2.5.31-2","2.5.31-2.1build1","2.5.31-2.1build2","2.5.31-2.1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.31-2.1ubuntu1","binary_name":"libgphoto2-6t64"},{"binary_version":"2.5.31-2.1ubuntu1","binary_name":"libgphoto2-l10n"},{"binary_version":"2.5.31-2.1ubuntu1","binary_name":"libgphoto2-port12t64"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.31-4","2.5.31-4build1","2.5.31-4ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.31-4ubuntu1","binary_name":"libgphoto2-6t64"},{"binary_version":"2.5.31-4ubuntu1","binary_name":"libgphoto2-l10n"},{"binary_version":"2.5.31-4ubuntu1","binary_name":"libgphoto2-port12t64"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}},{"package":{"name":"libgphoto2","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/libgphoto2?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.31-4build1","2.5.32-1","2.5.33-1","2.5.33-1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.33-1ubuntu1","binary_name":"libgphoto2-6t64"},{"binary_name":"libgphoto2-l10n","binary_version":"2.5.33-1ubuntu1"},{"binary_name":"libgphoto2-port12t64","binary_version":"2.5.33-1ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40333.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}