Where
-Infinity
0

Vendor Risk Score

See how opensc project compares to other vendors in security performance

View Risk Score →
Severity
1
Buffer Overflow
AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

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.

First published (updated )
Severity
1
Buffer Overflow
AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in pivprocesshistory() in src/libopensc/card-piv.c that allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device returning a URL field longer than 118 bytes in the Key History Object ASN.1 response.

First published (updated )
Severity
6.8
CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, an attacker with physical access to the computer at the time user or administrator uses a token can cause a stack-buffer-overflow WRITE in card-oberthur. The attack requires crafted USB device or smart card that would present the system with specially crafted responses to the APDUs. This issue has been patched in version 0.27.0.

1 / 2
Source: NVD
First published (updated )
Severity
6.8
CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, sccompacttlvfindtag searches a compact-TLV buffer for a given tag. In compact-TLV, a single byte encodes the tag (high nibble) and value length (low nibble). With a 1-byte buffer {0x0A}, the encoded element claims tag=0 and length=10 but no value bytes follow. Calling sccompacttlvfindtag with search tag 0x00 returns a pointer equal to buf+1 and outlen=10 without verifying that the claimed value length fits within the remaining buffer. In cases where the sccompacttlvfindtag is provided untrusted data (such as being read from cards/files), attackers may be able to influence it to return out-of-bounds pointers leading to downstream memory corruption when subsequent code tries to dereference the pointer. This issue has been patched in version 0.27.0.

1 / 2
Source: NVD
First published (updated )
Severity
6.8
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, feeding a crafted input to the fuzzpkcs15reader harness causes OpenSC to perform an out-of-bounds heap read in the X.509/SPKI handling path. Specifically, scpkcs15pubkeyfromspkifields() allocates a zero-length buffer and then reads one byte past the end of that allocation. This issue has been patched in version 0.27.0.

1 / 2
Source: MITRE
First published (updated )
Severity
6.8
AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, an attacker with physical access to the computer at the time user or administrator uses a token can cause a stack-buffer-overflow write in GET RESPONSE. The attack requires crafted USB device or smart card that would present the system with specially crafted responses to the APDUs. This issue has been patched in version 0.27.0.

1 / 2
Source: MITRE
First published (updated )
Severity
2.9
EPSS
0.04%
Buffer Overflow
CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

A heap-based buffer overflow vulnerability was found in the libopensc OpenPGP driver. A crafted USB device or smart card with malicious responses to the APDUs during the card enrollment process using the pkcs15-init tool may lead to out-of-bound rights, possibly resulting in arbitrary code execution.

1 / 3
Source: NVD
First published (updated )
Severity
3.9
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs.

The following problems were caused by insufficient control of the response APDU buffer and its length when communicating with the card.

1 / 4
Source: NVD
First published (updated )
Severity
4.3
AV:P/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs. When buffers are partially filled with data, initialized parts of the buffer can be incorrectly accessed.

1 / 3
Source: NVD
First published (updated )
Severity
3.9
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. The problem is missing initialization of variables expected to be initialized (as arguments to other functions, etc.).

1 / 4
Source: NVD
First published (updated )
Severity
3.9
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs.

Insufficient or missing checking of return values of functions leads to unexpected work with variables that have not been initialized.

1 / 4
Source: NVD
First published (updated )
Severity
3.9
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in pkcs15-init in OpenSC. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs.

Insufficient or missing checking of return values of functions leads to unexpected work with variables that have not been initialized.

1 / 4
Source: NVD
First published (updated )
Severity
6.8
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in the pkcs15-init tool in OpenSC. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs. When buffers are partially filled with data, initialized parts of the buffer can be incorrectly accessed.

1 / 3
Source: NVD
First published (updated )
Severity
3.4
Use After Free
AV:P/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

The Use After Free vulnerability was identified within the AuthentIC driver in OpenSC packages, particularly in the card enrollment process using pkcs15-init when a user or administrator enrolls or modifies cards. An attacker must have physical access to the computer system to take advantage of this flaw. The attack requires a crafted USB device or smart card to present the system with specially crafted responses to the APDUs, which are considered high complexity and low severity. This manipulation can potentially allow for compromising card management operations during enrollment.

Originally reported by OSS-fuzz automated service.

1 / 2
Source: Red Hat
First published (updated )
Severity
5.9
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

A vulnerability was found in OpenSC where PKCS#1 encryption padding removal is not implemented as side-channel resistant. This issue may result in the potential leak of private data.

1 / 3
Source: NVD
First published (updated )
Severity
4.5
AV:P/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L

An out-of-bounds read in MyEID driver handling encryption using symmetric keys. An attacker with physical access to the computer running opensc and crafted USB device or smart card that would present the system with specially crafted responses to the APDUs so they are considered a high-complexity and low-severity.

This issue is in the code handling symmetric keys, which are not widely used for example for desktop login so most of the deployments are not affected.

https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651 https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1

1 / 2
Source: Red Hat
First published (updated )
Severity
6.6
AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

A flaw was found in OpenSC packages that allow a potential PIN bypass. When a token/card is authenticated by one process, it can perform cryptographic operations in other processes when an empty zero-length pin is passed. This issue poses a security risk, particularly for OS logon/screen unlock and for small, permanently connected tokens to computers. Additionally, the token can internally track login status. This flaw allows an attacker to gain unauthorized access, carry out malicious actions, or compromise the system without the user's awareness.

1 / 3
Source: NVD
First published (updated )
Severity
6.4
Buffer Overflow
AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H

Last updated 10 April 2025

1 / 5
Source: Ubuntu
First published (updated )
Severity
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Stack overflow vulnerability in OpenSC smart card middleware before 0.23 via crafted responses to APDUs.

First published (updated )
Severity
7.1
Buffer Overflow
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H

A vulnerability was found in OpenSC. This issue causes a buffer overrun in the pkcs15 cardoshaveverifyrcpackage. This flaw allows an attacker to supply a smart card package with a malformed ASN1 context. The cardoshaveverifyrcpackage function scans the ASN1 buffer for two tags, where the remaining length is wrongly calculated due to a moved starting pointer, leading to a possible heap-based buffer out-of-bounds read. In cases where ASN is enabled while compiling, this problem causes a crash, and further information leaks or more damage is likely.

1 / 4
First published (updated )
Severity
5.3
Buffer Overflow
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Last updated 10 April 2025

1 / 3
Source: Ubuntu
First published (updated )
Severity
5.3
Buffer Overflow
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Heap buffer overflow issues were found in Opensc before version 0.22.0 in pkcs15-oberthur.c that could potentially crash programs using the library.

1 / 2
Source: MITRE
First published (updated )
Severity
5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

A use after return issue was found in Opensc before version 0.22.0 in insertpin function that could potentially crash programs using the library.

1 / 3
Source: MITRE
First published (updated )
Severity
5.3
Use After Free
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

A heap use after free issue was found in Opensc before version 0.22.0 in scfilevalid.

1 / 2
Source: MITRE
First published (updated )
Severity
5.3
Double Free
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

A heap double free issue was found in Opensc before version 0.22.0 in scpkcs15freetokeninfo.

1 / 2
Source: MITRE
First published (updated )
Severity
5.5
Buffer Overflow
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

The Oberthur smart card software driver in OpenSC before 0.21.0-rc1 has a heap-based buffer overflow in scoberthurreadfile.

First published (updated )
Severity
5.5
Buffer Overflow
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

The gemsafe GPK smart card software driver in OpenSC before 0.21.0-rc1 has a stack-based buffer overflow in scpkcs15emugemsafeGPKinit.

First published (updated )
Severity
5.5
Buffer Overflow
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

The TCOS smart card software driver in OpenSC before 0.21.0-rc1 has a stack-based buffer overflow in tcosdecipher.

First published (updated )
Severity
6.8
Double Free
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

OpenSC before 0.20.0 has a double free in coolkeyfreeprivatedata because coolkeyaddobject in libopensc/card-coolkey.c lacks a uniqueness check.

First published (updated )
Severity
6.3
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

OpenSC OpenSC.tokend has an Arbitrary File Creation/Overwrite Vulnerability

First published (updated )

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