CVE-2021-3798
NixOS vulnerability analysis and mitigation

Overview

A security vulnerability (CVE-2021-3798) was discovered in openCryptoki's Soft token implementation. The vulnerability affects versions 3.15.0 and later, where EC support was first introduced. The flaw exists because the openCryptoki Soft token does not properly validate EC keys when they are created via CCreateObject or when CDeriveKey is used with ECDH public data (CVE Details, Red Hat Bugzilla).

Technical details

The vulnerability stems from missing validation checks in the EC key handling process. Specifically, when constructing an OpenSSL EC public or private key from PKCS#11 attributes or ECDH public data, the system failed to verify that the key point lies on the intended elliptic curve. This issue was addressed by adding validation checks through the ECKEYcheckkey() function in the filleckeyfrompubkey() and filleckeyfrom_privkey() functions (GitHub Commit).

Impact

The vulnerability could allow a malicious user to perform an invalid curve attack, potentially leading to the extraction of the private key. In an invalid curve attack, the attacker can trick the vulnerable application into using curve points outside of the intended elliptic curve, compromising the security of the cryptographic operations (Red Hat Bugzilla).

Mitigation and workarounds

The vulnerability has been fixed in openCryptoki version 3.17.0. The fix implements proper validation checks for EC keys during creation and derivation operations. Users are advised to upgrade to the patched version. Red Hat Enterprise Linux 8 users can apply the fix through RHBA-2021:3054 (Red Hat Bugzilla).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-48606HIGH7.8
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48639HIGH7.3
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48625HIGH7
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48608MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025
CVE-2025-48569MEDIUM5.5
  • NixOSNixOS
  • android
NoNoDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management