ubuntu-cve-2026-40335
Vulnerability from osv_ubuntu
Published
2026-04-18 00:16
Modified
2026-05-20 15:27
Summary
Details
libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in ptp_unpack_DPV() in camlibs/ptp2/ptp-pack.c (lines 622–629). The UINT128 and INT128 cases advance *offset += 16 without verifying that 16 bytes remain in the buffer. The entry check at line 609 only guarantees *offset < total (at least 1 byte available), leaving up to 15 bytes unvalidated. Commit 433bde9888d70aa726e32744cd751d7dbe94379a patches the issue.
Severity
5.2 (Medium)
N/A (UNKNOWN)
References
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libgphoto2-6",
"binary_version": "2.5.3.1-1ubuntu2.2"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.3.1-1ubuntu2.2"
},
{
"binary_name": "libgphoto2-port10",
"binary_version": "2.5.3.1-1ubuntu2.2"
}
]
},
"package": {
"ecosystem": "Ubuntu:14.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.3.1-1ubuntu2.2?arch=source\u0026distro=trusty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"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.9-3"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.9-3"
},
{
"binary_name": "libgphoto2-port12",
"binary_version": "2.5.9-3"
}
]
},
"package": {
"ecosystem": "Ubuntu:16.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.9-3?arch=source\u0026distro=xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"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_name": "libgphoto2-6",
"binary_version": "2.5.16-2"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.16-2"
},
{
"binary_name": "libgphoto2-port12",
"binary_version": "2.5.16-2"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.16-2?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5.14-1",
"2.5.16-2"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libgphoto2-6",
"binary_version": "2.5.25-0ubuntu0.1"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.25-0ubuntu0.1"
},
{
"binary_name": "libgphoto2-port12",
"binary_version": "2.5.25-0ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.25-0ubuntu0.1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5.23-2",
"2.5.24-1",
"2.5.25-0ubuntu0.1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libgphoto2-6",
"binary_version": "2.5.27-1build2"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.27-1build2"
},
{
"binary_name": "libgphoto2-port12",
"binary_version": "2.5.27-1build2"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.27-1build2?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5.27-1",
"2.5.27-1build1",
"2.5.27-1build2"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"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",
"binary_version": "2.5.31-2.1ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.31-2.1ubuntu1?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"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_name": "libgphoto2-6t64",
"binary_version": "2.5.31-4ubuntu1"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.31-4ubuntu1"
},
{
"binary_name": "libgphoto2-port12t64",
"binary_version": "2.5.31-4ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:25.10",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.31-4ubuntu1?arch=source\u0026distro=questing"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5.31-4",
"2.5.31-4build1",
"2.5.31-4ubuntu1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libgphoto2-6t64",
"binary_version": "2.5.33-1ubuntu1"
},
{
"binary_name": "libgphoto2-l10n",
"binary_version": "2.5.33-1ubuntu1"
},
{
"binary_name": "libgphoto2-port12t64",
"binary_version": "2.5.33-1ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "libgphoto2",
"purl": "pkg:deb/ubuntu/libgphoto2@2.5.33-1ubuntu1?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5.31-4build1",
"2.5.32-1",
"2.5.33-1",
"2.5.33-1ubuntu1"
]
}
],
"aliases": [],
"details": "libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in `ptp_unpack_DPV()` in `camlibs/ptp2/ptp-pack.c` (lines 622\u2013629). The UINT128 and INT128 cases advance `*offset += 16` without verifying that 16 bytes remain in the buffer. The entry check at line 609 only guarantees `*offset \u003c total` (at least 1 byte available), leaving up to 15 bytes unvalidated. Commit 433bde9888d70aa726e32744cd751d7dbe94379a patches the issue.",
"id": "UBUNTU-CVE-2026-40335",
"modified": "2026-05-20T15:27:26Z",
"published": "2026-04-18T00:16:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2026-40335"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-40335"
},
{
"type": "REPORT",
"url": "https://github.com/gphoto/libgphoto2/security/advisories/GHSA-g4g5-c2x9-cqfj"
},
{
"type": "REPORT",
"url": "https://github.com/gphoto/libgphoto2/commit/433bde9888d70aa726e32744cd751d7dbe94379a"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2026-40335"
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…