CVE-2021-32489
NixOS vulnerability analysis and mitigation

Overview

An issue was discovered in the sendsecuremsg() function of Yubico yubihsm-shell through 2.0.3. The function does not correctly validate the embedded length field of an authenticated message received from the device because responsemsg.st.len=8 can be accepted but triggers an integer overflow, which causes CRYPTOcbc128decrypt (in OpenSSL) to encounter an undersized buffer and experience a segmentation fault. The yubihsm-shell project is included in the YubiHSM 2 SDK product (NVD).

Technical details

The vulnerability occurs in the message parsing logic where messages with responsemsg.st.len = 8 are accepted. The session ID is read from the lowest memory position while the MAC is read from the highest memory position, allowing the fields to overlap. When both checks pass, the uint16t outlen variable is decremented too far by the combination of outlen -= 8 and out_len -= 1, causing it to overflow to 65535. This leads to OpenSSL being instructed to work on a buffer of size 65535 while the actual buffer is much smaller, resulting in a segmentation fault (Security Blog).

Impact

The vulnerability can lead to a denial of service through segmentation faults when processing malicious messages from a compromised HSM device. The issue affects applications using the yubihsm-shell component for HSM communication (NVD).

Mitigation and workarounds

The vulnerability has been patched in YubiHSM 2 SDK version 2021.03 and libyubihsm version 2.1.0. Users should upgrade to these or later versions to mitigate the issue (Security Blog).

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-12819HIGH8.1
  • NixOSNixOS
  • pgbouncer
NoYesDec 03, 2025
CVE-2025-20777MEDIUM6.7
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-65105MEDIUM5.3
  • NixOSNixOS
  • apptainer
NoYesDec 02, 2025
CVE-2025-20789MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 2025
CVE-2025-20788MEDIUM4.4
  • NixOSNixOS
  • android
NoNoDec 02, 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