Memory corruption via unchecked profile key length
Published May 29, 2026 · Updated May 29, 2026
Buffer overflow in OpenSC before 0.27.0 allows physically proximate attackers to corrupt memory through a crafted profile file. The do_key_value() function copies an equals-prefixed key into keybuf with memcpy without first limiting the key length to the buffer size. The file must be parsed during a pkcs15-init invocation; published evidence establishes stack and heap corruption but not code execution.
Summary
What happened
Buffer overflow in OpenSC before 0.27.0 allows physically proximate attackers to corrupt memory through a crafted profile file. The do_key_value() function copies an equals-prefixed key into keybuf with memcpy without first limiting the key length to the buffer size. The file must be parsed during a pkcs15-init invocation; published evidence establishes stack and heap corruption but not code execution.
The record
- CVE
- CVE-2026-40528
- Published
- May 29, 2026
- Updated
- May 29, 2026
- Vendor
- OpenSC Project
- Product
- OpenSC
- Classifications
- CWE-122, CWE-121, T1204.002
- Attack vector
- physical
- Privileges
- unauthenticated
Timeline
How it unfolded
- May 29, 2026CVE publishedPublication date reported by the CVE source.
- May 29, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <0.27.0
- Affected versionversion=0 <0358817ec74aeca654f83e7709c7720b14c5db59
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo