{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66038 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2025-66038 is a low-severity memory corruption vulnerability in Opensc Project Opensc, published on 30 Mar 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-2025-66038 and fix it if it is affected.\n\nWhat it is: CVE-2025-66038 is a low-severity memory corruption vulnerability in Opensc Project Opensc, published on 30 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66038 exists.\n\nAffected product: Opensc Project Opensc. 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-2025-66038/ (Markdown: https://insights.sbomify.com/CVE-2025-66038/index.md)","id":"CVE-2025-66038","markdown":"https://insights.sbomify.com/CVE-2025-66038/index.md","name":"CVE-2025-66038","record":{"aliases":["AZL-81192","BELL-CVE-2025-66038","DEBIAN-CVE-2025-66038","GHSA-72x5-fwjx-2459","UBUNTU-CVE-2025-66038"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Smart card middleware","requires_auth":"none","summary":"Attackers can trigger out-of-bounds pointer returns in OpenSC via crafted smart card data, potentially leading to memory corruption and code execution.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"opensc","vendor":"opensc_project"}],"cvss":{"score":3.9,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-126","name":"Buffer Over-read"}],"description":"OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, sc_compacttlv_find_tag searches a compact-TLV buffer for a given tag. In compact-TLV, a single byte encodes the tag (high nibble) and value length (low nibble). With a 1-byte buffer {0x0A}, the encoded element claims tag=0 and length=10 but no value bytes follow. Calling sc_compacttlv_find_tag with search tag 0x00 returns a pointer equal to buf+1 and outlen=10 without verifying that the claimed value length fits within the remaining buffer. In cases where the sc_compacttlv_find_tag is provided untrusted data (such as being read from cards/files), attackers may be able to influence it to return out-of-bounds pointers leading to downstream memory corruption when subsequent code tries to dereference the pointer. This issue has been patched in version 0.27.0.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"OpenSC: `sc_compacttlv_find_tag` can return out-of-bounds pointers","id":"CVE-2025-66038","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"opensc_project:opensc","products":["opensc_project:opensc"],"type":"memory_corruption","year":"2025"},"n_packages":0,"n_references":3,"next":{"headline":"FreePBX Endpoint Manager Allows Unauthenticated Logins to Administrator Control Panel via Forged Basic Auth Header","id":"CVE-2025-66039"},"packages":[],"prev":{"headline":"OpenSC: Out of Bounds vulnerability","id":"CVE-2025-66037"},"products":["OpenSC"],"published":"2026-03-30","related":[{"cvss_score":7.5,"headline":"Memory corruption in n/a","id":"CVE-2021-34193","kev_date_added":null,"published":"2023-08-22"},{"cvss_score":7.5,"headline":"Memory corruption in n/a","id":"CVE-2019-16058","kev_date_added":null,"published":"2019-09-06"},{"cvss_score":7.5,"headline":"Denial of service in n/a","id":"CVE-2019-6502","kev_date_added":null,"published":"2019-01-22"},{"cvss_score":7.1,"headline":"Memory corruption in OpenSC","id":"CVE-2023-2977","kev_date_added":null,"published":"2023-06-01"},{"cvss_score":6.8,"headline":"Use after free in n/a","id":"CVE-2019-20792","kev_date_added":null,"published":"2020-04-29"},{"cvss_score":6.8,"headline":"Memory corruption in n/a","id":"CVE-2018-16391","kev_date_added":null,"published":"2018-09-03"},{"cvss_score":6.8,"headline":"Memory corruption in n/a","id":"CVE-2018-16392","kev_date_added":null,"published":"2018-09-03"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-01","vendors":["OpenSC"]},"summary":"Attackers can trigger out-of-bounds pointer returns in OpenSC via crafted smart card data, potentially leading to memory corruption and code execution.","url":"https://insights.sbomify.com/CVE-2025-66038/"}