Heap-buffer-overflow in epassNUMBER_pkcs15_generate_key in opensc

opensc Updated 02 Oct 2025

Summary

16/11/2023
MEDIUM
Yes i
Medium
Not published

OSV-2023-1169: Heap-buffer-overflow in epassNUMBER_pkcs15_generate_key. Affects opensc versions >= 22f73781706a293d10ebe982ece863a73fd62bf3, < 609164045facaeae193feb48d9c2fc5cc4321e8a. Fixed in 609164045facaeae193feb48d9c2fc5cc4321e8a. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

OpenSC is an open-source smart card library that provides a set of cryptographic functions for interacting with smart cards. It is commonly used in applications that require secure authentication and data encryption. The vulnerability in question affects the epassNUMBER_pkcs15_generate_key function within OpenSC, leading to a heap-buffer-overflow read. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition.

Vulnerability Detail

The heap-buffer-overflow vulnerability in epassNUMBER_pkcs15_generate_key arises due to a flaw in the implementation of the function. When certain input data is processed, it can lead to a read beyond the bounds of a heap buffer, resulting in a crash or potential code execution. The vulnerability was discovered through OSS-Fuzz, and more details can be found in the provided report. The severity of this vulnerability is classified as MEDIUM.

How To Fix

Minimum fixed version

609164045facaeae193feb48d9c2fc5cc4321e8a

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, if updating the OpenSC package is not immediately feasible, it is recommended to disable or restrict access to the affected functionality. This can help mitigate the risk of exploitation until a proper fix can be applied.

Conclusion

In conclusion, the heap-buffer-overflow vulnerability in epassNUMBER_pkcs15_generate_key in the OpenSC package can be mitigated by updating to a fixed version or applying the provided workaround. It is crucial to address this vulnerability promptly to prevent potential exploitation. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for opensc →

Share this vulnerability

FAQ

OpenSC is an open-source smart card library used for secure authentication and data encryption.

A heap-buffer-overflow vulnerability occurs when a program tries to read or write data beyond the bounds of a heap-allocated buffer, potentially leading to crashes or code execution.

This vulnerability was discovered through OSS-Fuzz, a continuous fuzzing service for open-source software.

The severity of this vulnerability is classified as MEDIUM.

To fix this vulnerability, update the OpenSC package to a version that includes the fix.

Related vulnerabilities

Recent vulnerabilities recorded for opensc.

How To Fix

Minimum fixed version

609164045facaeae193feb48d9c2fc5cc4321e8a

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback