CVE-2020-13131
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is...
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
Attack profile
How easy it is to exploit
- Attack vector
- Physical
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
CVE-2020-13131- CVSS 3.0
- 4.3 Medium
CVSS:3.0/AC:L/AV:P/A:N/C:H/I:N/PR:N/S:U/UI:R - Updated
- 2026-11-02
EUVDEUVD-2020-5407
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
EUVD-2020-5407- CVSS 3.0
- 4.3 Medium
CVSS:3.0/AC:L/AV:P/A:N/C:H/I:N/PR:N/S:U/UI:R - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-rx8c-cr48-p2ff No score
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is...
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
GHSA-rx8c-cr48-p2ff- Updated
- 2026-11-02
NVD
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
CVE-2020-13131- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - CVSS 3.0
- 4.3 Medium
CVSS:3.0/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - CVSS 2.0
- 1.9 Low
AV:L/AC:M/Au:N/C:P/I:N/A:N - Weakness
- CWE-125
- Updated
- 2026-11-02
OSV
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
CVE-2020-13131- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2020-13131
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
DEBIAN-CVE-2020-13131- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2020-13131
4.3
An issue was discovered in Yubico libykpiv before 2.1.0. lib/util.c in this library (which is included in yubico-piv-tool) does not properly check embedded length fields during device communication. A malicious PIV token can misreport the returned length fields during RSA key generation. This will cause stack memory to be copied into heap allocated memory that gets returned to the caller. The leaked memory could include PINs, passwords, key material, and other sensitive information depending on the integration. During further processing by the caller, this information could leak across trust boundaries. Note that RSA key generation is triggered by the host and cannot directly be triggered by the token.
- Record
UBUNTU-CVE-2020-13131- CVSS 3.1
- 4.3 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - CVSS 3.0
- 4.3 Medium
CVSS:3.0/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
yubico-piv-toolDebian:12 |
before 2.1.1-1 | 2.1.1-1 |
yubico-piv-toolDebian:13 |
before 2.1.1-1 | 2.1.1-1 |
yubico-piv-toolDebian:14 |
before 2.1.1-1 | 2.1.1-1 |
yubico-piv-toolUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 1.0.1-11.0.3-11.0.3-1ubuntu0.1~esm1 |
None known |
yubico-piv-toolUbuntu:18.04:LTS |
All versions, plus listed versions 1.4.2-21.4.2-2ubuntu0.1 |
None known |
yubico-piv-toolUbuntu:20.04:LTS |
All versions, plus listed versions 1.7.0-12.0.0-12.0.0-2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-13131 is a medium vulnerability (CVSS 4.3) in Yubico Libykpiv, published July 9, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.49%, the 42nd percentile. Fixed in yubico-piv-tool 2.1.1-1.
References
blog.inhq.net/posts/yubico-libykpiv-vuln
yubico.com/products/services-software/download/smart-card-drivers-tools
nvd.nist.gov/vuln/detail/CVE-2020-13131
github.com/advisories/GHSA-rx8c-cr48-p2ff
security-tracker.debian.org/tracker/CVE-2020-13131
ubuntu.com/security/CVE-2020-13131
cve.org/CVERecord?id=CVE-2020-13131