Integer Overflow or Wraparound Affecting yubico/yubihsm-shell package, versions [,2.1.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.92% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-YUBICOYUBIHSMSHELL-2367132
  • published26 Jan 2022
  • disclosed10 May 2021
  • creditUnknown

Introduced: 10 May 2021

CVE-2021-32489  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade yubico/yubihsm-shell to version 2.1.0 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound. An issue was discovered in the _send_secure_msg() 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 response_msg.st.len=8 can be accepted but triggers an integer overflow, which causes CRYPTO_cbc128_decrypt (in OpenSSL) to encounter an undersized buffer and experience a segmentation fault. The yubihsm-shell project is included in the YubiHSM 2 SDK product.

CVSS Base Scores

version 3.1