Buffer Overflow Affecting opensc-debugsource package, versions <0:0.24.0-1.amzn2023.0.6


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.19% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2023-OPENSCDEBUGSOURCE-18065147
  • published21 Jul 2026
  • disclosed29 May 2026

Introduced: 29 May 2026

CVE-2026-40528  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2023 opensc-debugsource to version 0:0.24.0-1.amzn2023.0.6 or higher.
This issue was patched in ALAS2023-2026-1988.

NVD Description

Note: Versions mentioned in the description apply only to the upstream opensc-debugsource package and not the opensc-debugsource package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2023 relevant fixed versions and status.

OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.

CVSS Base Scores

version 3.1