oesa-2026-2785
Vulnerability from osv_openeuler
is the core of gphoto2 software. It is a portable library which gives access to literally hundreds of digital cameras.
Security Fix(es):
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.(CVE-2026-40333)
libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have a memory leak in ptp_unpack_Sony_DPD() in camlibs/ptp2/ptp-pack.c (lines 884–885). When processing a secondary enumeration list (introduced in 2024+ Sony cameras), the function overwrites dpd->FORM.Enum.SupportedValue with a new calloc() without freeing the previous allocation from line 857. The original array and any string values it contains are leaked on every property descriptor parse. Commit 404ff02c75f3cb280196fc260a63c4d26cf1a8f6 fixes the issue.(CVE-2026-40336)
| URL | Type | |
|---|---|---|
{
"affected": [
{
"ecosystem_specific": {
"aarch64": [
"libgphoto2-2.5.34-1.oe2403sp1.aarch64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2403sp1.aarch64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2403sp1.aarch64.rpm",
"libgphoto2-devel-2.5.34-1.oe2403sp1.aarch64.rpm"
],
"noarch": [
"libgphoto2-help-2.5.34-1.oe2403sp1.noarch.rpm"
],
"src": [
"libgphoto2-2.5.34-1.oe2403sp1.src.rpm"
],
"x86_64": [
"libgphoto2-2.5.34-1.oe2403sp1.x86_64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2403sp1.x86_64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2403sp1.x86_64.rpm",
"libgphoto2-devel-2.5.34-1.oe2403sp1.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS-SP1",
"name": "libgphoto2",
"purl": "pkg:rpm/openEuler/libgphoto2\u0026distro=openEuler-24.03-LTS-SP1"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.34-1.oe2403sp1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"libgphoto2-2.5.34-1.oe2403sp3.aarch64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2403sp3.aarch64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2403sp3.aarch64.rpm",
"libgphoto2-devel-2.5.34-1.oe2403sp3.aarch64.rpm"
],
"noarch": [
"libgphoto2-help-2.5.34-1.oe2403sp3.noarch.rpm"
],
"src": [
"libgphoto2-2.5.34-1.oe2403sp3.src.rpm"
],
"x86_64": [
"libgphoto2-2.5.34-1.oe2403sp3.x86_64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2403sp3.x86_64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2403sp3.x86_64.rpm",
"libgphoto2-devel-2.5.34-1.oe2403sp3.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:24.03-LTS-SP3",
"name": "libgphoto2",
"purl": "pkg:rpm/openEuler/libgphoto2\u0026distro=openEuler-24.03-LTS-SP3"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.34-1.oe2403sp3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"libgphoto2-2.5.34-1.oe2003sp4.aarch64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2003sp4.aarch64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2003sp4.aarch64.rpm",
"libgphoto2-devel-2.5.34-1.oe2003sp4.aarch64.rpm"
],
"noarch": [
"libgphoto2-help-2.5.34-1.oe2003sp4.noarch.rpm"
],
"src": [
"libgphoto2-2.5.34-1.oe2003sp4.src.rpm"
],
"x86_64": [
"libgphoto2-2.5.34-1.oe2003sp4.x86_64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2003sp4.x86_64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2003sp4.x86_64.rpm",
"libgphoto2-devel-2.5.34-1.oe2003sp4.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:20.03-LTS-SP4",
"name": "libgphoto2",
"purl": "pkg:rpm/openEuler/libgphoto2\u0026distro=openEuler-20.03-LTS-SP4"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.34-1.oe2003sp4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"libgphoto2-2.5.34-1.oe2203sp4.aarch64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2203sp4.aarch64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2203sp4.aarch64.rpm",
"libgphoto2-devel-2.5.34-1.oe2203sp4.aarch64.rpm"
],
"noarch": [
"libgphoto2-help-2.5.34-1.oe2203sp4.noarch.rpm"
],
"src": [
"libgphoto2-2.5.34-1.oe2203sp4.src.rpm"
],
"x86_64": [
"libgphoto2-2.5.34-1.oe2203sp4.x86_64.rpm",
"libgphoto2-debuginfo-2.5.34-1.oe2203sp4.x86_64.rpm",
"libgphoto2-debugsource-2.5.34-1.oe2203sp4.x86_64.rpm",
"libgphoto2-devel-2.5.34-1.oe2203sp4.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:22.03-LTS-SP4",
"name": "libgphoto2",
"purl": "pkg:rpm/openEuler/libgphoto2\u0026distro=openEuler-22.03-LTS-SP4"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.34-1.oe2203sp4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"severity": "Medium"
},
"details": "is the core of gphoto2 software. It is a portable library which gives access to literally hundreds of digital cameras.\r\n\r\nSecurity Fix(es):\n\nlibgphoto2 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.(CVE-2026-40333)\n\nlibgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have a memory leak in `ptp_unpack_Sony_DPD()` in `camlibs/ptp2/ptp-pack.c` (lines 884\u2013885). When processing a secondary enumeration list (introduced in 2024+ Sony cameras), the function overwrites dpd-\u0026gt;FORM.Enum.SupportedValue with a new calloc() without freeing the previous allocation from line 857. The original array and any string values it contains are leaked on every property descriptor parse. Commit 404ff02c75f3cb280196fc260a63c4d26cf1a8f6 fixes the issue.(CVE-2026-40336)",
"id": "OESA-2026-2785",
"modified": "2026-08-06T11:11:42Z",
"published": "2026-06-24T11:11:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-2785"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40333"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40336"
}
],
"schema_version": "1.7.2",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "libgphoto2 security update",
"upstream": [
"CVE-2026-40333",
"CVE-2026-40336"
]
}
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.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.