{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2026-40334 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2026-40334 is a low-severity 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."},"fix_prompt":"Check this codebase for CVE-2026-40334 and fix it if it is affected.\n\nWhat it is: CVE-2026-40334 is a low-severity 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.\nExploitation: There is no known exploitation of CVE-2026-40334 in the wild and no public exploit code.\n\nAffected product: libgphoto2. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40334/ (Markdown: https://insights.sbomify.com/CVE-2026-40334/index.md)","id":"CVE-2026-40334","markdown":"https://insights.sbomify.com/CVE-2026-40334/index.md","name":"CVE-2026-40334","record":{"aliases":["AZL-83012","DEBIAN-CVE-2026-40334","GHSA-ph87-cc3j-c6hm","UBUNTU-CVE-2026-40334"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Camera access library","requires_auth":"none","summary":"A missing null terminator in libgphoto2 allows out-of-bounds reads, potentially disclosing sensitive memory contents to attackers.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":3.5,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-170","name":"Improper Null Termination"}],"description":"libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, a missing null terminator exists in ptp_unpack_Canon_FE() in camlibs/ptp2/ptp-pack.c (line 1377). The function copies a filename into a 13-byte buffer using strncpy without explicitly null-terminating the result. If the source data is exactly 13 bytes with no null terminator, the buffer is left unterminated, leading to out-of-bounds reads in any subsequent string operation. Commit 259fc7d3bfe534ce4b114c464f55b448670ab873 patches the issue.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"libgphoto2 missing null termination in ptp_unpack_Canon_FE() filename buffer in ptp-pack.c","id":"CVE-2026-40334","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"information_disclosure","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"libgphoto2 has OOB read in ptp_unpack_DPV() UINT128/INT128 handling in ptp-pack.c","id":"CVE-2026-40335"},"packages":[],"prev":{"headline":"Memory corruption in libgphoto2","id":"CVE-2026-40333"},"products":["libgphoto2"],"published":"2026-04-17","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-20","vendors":["gphoto"]},"summary":"A missing null terminator in libgphoto2 allows out-of-bounds reads, potentially disclosing sensitive memory contents to attackers.","url":"https://insights.sbomify.com/CVE-2026-40334/"}