{"answers":{"affected":"It affects 2 products.","exploited":"There is no known exploitation of CVE-2023-2977 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2023-2977 is a high-severity memory corruption vulnerability in Opensc Project Opensc, published on 1 Jun 2023. 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-2023-2977 and fix it if it is affected.\n\nWhat it is: CVE-2023-2977 is a high-severity memory corruption vulnerability in Opensc Project Opensc, published on 1 Jun 2023. 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-2023-2977 in the wild and no public exploit code.\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-2023-2977/ (Markdown: https://insights.sbomify.com/CVE-2023-2977/index.md)","id":"CVE-2023-2977","markdown":"https://insights.sbomify.com/CVE-2023-2977/index.md","name":"CVE-2023-2977","record":{"aliases":["ALSA-2023:6587","ALSA-2023:7160","AZL-27012","AZL-35073","BELL-CVE-2023-2977","CLSA-2025-1760022476","DEBIAN-CVE-2023-2977","GHSA-p22r-5f28-437x","MGASA-2023-0222","OESA-2023-1678","OESA-2023-1679","RHSA-2023:6587","RHSA-2023:7160","SUSE-SU-2023:2466-1","SUSE-SU-2023:2508-1","SUSE-SU-2023:2516-1","UBUNTU-CVE-2023-2977","openSUSE-SU-2024:12968-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"OpenSC smart card library","requires_auth":"low_privilege","summary":"A heap-based buffer over-read in OpenSC allows attackers to cause crashes or leak information via a malformed smart card package.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"opensc","vendor":"opensc_project"},{"product":"enterprise_linux","vendor":"redhat"}],"cvss":{"score":7.1,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"},{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"description":"A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15 cardos_have_verifyrc_package. The attacker can supply a smart card package with malformed ASN1 context. The cardos_have_verifyrc_package function scans the ASN1 buffer for 2 tags, where remaining length is wrongly caculated due to moved starting pointer. This leads to possible heap-based buffer oob read. In cases where ASAN is enabled while compiling this causes a crash. Further info leak or more damage is possible.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:9::baseos","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Micro 5.3","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Module for Basesystem 15 SP5","SUSE:Linux Enterprise Real Time 15 SP3","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","openSUSE:Leap 15.4","openSUSE:Leap 15.5","openSUSE:Leap Micro 5.3","openSUSE:Tumbleweed"],"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":"Memory corruption in OpenSC","id":"CVE-2023-2977","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"opensc_project:opensc","products":["opensc_project:opensc","redhat:enterprise_linux"],"type":"memory_corruption","year":"2023"},"n_packages":21,"n_references":7,"next":{"headline":"Abstrium Pydio Cells Change Subscription authorization","id":"CVE-2023-2978"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["0.20.0-6.el8"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/almalinux/opensc","source":"ALSA-2023:7160"},{"ecosystem":"AlmaLinux:9","fixed":["0.23.0-2.el9"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/almalinux/opensc","source":"ALSA-2023:6587"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:0.20.0-6.el8"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/redhat/opensc","source":"RHSA-2023:7160"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:0.20.0-6.el8"],"introduced":["0"],"last_affected":[],"package":"opensc-debuginfo","purl":"pkg:rpm/redhat/opensc-debuginfo","source":"RHSA-2023:7160"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:0.20.0-6.el8"],"introduced":["0"],"last_affected":[],"package":"opensc-debugsource","purl":"pkg:rpm/redhat/opensc-debugsource","source":"RHSA-2023:7160"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:0.23.0-2.el9"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/redhat/opensc","source":"RHSA-2023:6587"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:0.23.0-2.el9"],"introduced":["0"],"last_affected":[],"package":"opensc-debuginfo","purl":"pkg:rpm/redhat/opensc-debuginfo","source":"RHSA-2023:6587"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:0.23.0-2.el9"],"introduced":["0"],"last_affected":[],"package":"opensc-debugsource","purl":"pkg:rpm/redhat/opensc-debugsource","source":"RHSA-2023:6587"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["0.19.0-150100.3.22.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2023:2508-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.2","fixed":["0.19.0-150100.3.22.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.2","source":"SUSE-SU-2023:2508-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.3","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.3","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.4","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.4","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP5","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","fixed":["0.19.0-150100.3.22.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3","source":"SUSE-SU-2023:2508-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["0.13.0-3.22.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2023:2466-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","fixed":["0.13.0-3.22.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/suse/opensc\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5","source":"SUSE-SU-2023:2466-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/opensuse/opensc\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/opensuse/opensc\u0026distro=openSUSE%20Leap%2015.5","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"openSUSE:Leap Micro 5.3","fixed":["0.22.0-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/opensuse/opensc\u0026distro=openSUSE%20Leap%20Micro%205.3","source":"SUSE-SU-2023:2516-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["0.23.0-2.1"],"introduced":["0"],"last_affected":[],"package":"opensc","purl":"pkg:rpm/opensuse/opensc\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12968-1"}],"prev":{"headline":"Use of temporary directory for file creation in `FileBackedOutputStream` in Guava","id":"CVE-2023-2976"},"products":["OpenSC"],"published":"2023-06-01","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":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":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["n/a"]},"summary":"A heap-based buffer over-read in OpenSC allows attackers to cause crashes or leak information via a malformed smart card package.","url":"https://insights.sbomify.com/CVE-2023-2977/"}