Skip to content
Fencer Vulns
medium 5.3

CVE-2021-42778 json

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

published 2022-04-18 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-29734

cvss
5.3
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.1%
EPSS 2.1% chance of exploitation in 30 days, percentile 82%
public exploits
0
none known

Summary

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

Patch / fix

  • opensc_project opensc 0.22.0
  • opensc Debian 14, Debian 13, Debian 12 0.22.0-1

debian advisories DEBIAN-CVE-2021-42778

  • opensc CBL-Mariner 2.0 0.22.0-1

azure linux advisories AZL-9481

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-42778 updated cvss 2.0

opensc: Heap double free in sc_pkcs15_free_tokeninfo

  • Red Hat Enterprise Linux 7 opensc
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 opensc
    affected: no fix available “Fix deferred”
  • Red Hat Enterprise Linux 9 opensc
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.14% chance of exploitation in the next 30 days, higher than 82% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Affected products

  • n/a opensc

Classification

Weakness
  • CWE-672 Operation on a Resource after Expiration or Release
  • CWE-415 Double Free

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.