CVE-2026-40528: OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c

Published May 29, 2026
·
Updated

OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the dokeyvalue() 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.

Affected Software

3 affected components
OpenSC OpenSC<0.27.0
Opensc Project Opensc<0.27.0
Microsoft azl3 opensc 0.27.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade OpenSC to a version that resolves this vulnerability.

    Fixed in 0.27.0Patch 0358817
  2. Compensating control

    If immediate upgrade is not possible, do not process or load untrusted/crafted OpenSC profile configuration files used by pkcs15-init (src/pkcs15init/profile.c do_key_value()).

Event History

May 29, 2026
CVE Published
via MITRE·01:38 PM
Data Sourced
via MITRE·01:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 31, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40528?

The severity of CVE-2026-40528 is low with a CVSS score of 3.8.

2

How do I fix CVE-2026-40528?

To fix CVE-2026-40528, update OpenSC to version 0.27.0 or later.

3

What type of vulnerability is CVE-2026-40528?

CVE-2026-40528 is classified as a buffer overrun vulnerability.

4

What can an attacker achieve with CVE-2026-40528?

An attacker can corrupt memory by supplying a crafted profile configuration file due to the buffer overrun.

5

In which OpenSC versions is CVE-2026-40528 present?

CVE-2026-40528 is present in OpenSC versions prior to 0.27.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203