CVE-2021-28484: Github.com/Yubico/yubihsm connector Infinite Loop Vulnerability

HIGH
Advisory Identifier: GHSA-8m9g-647g-5pxw
CVSS 6.5
CWE-835
Published
Advisory Summary

CVE-2021-28484 is a HIGH (CVSS 6.5) infinite loop vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Github.com/Yubico/yubihsm connector libraries in the Go ecosystem. The issue involves infinite loop in yubico yubihsm-connector. Remediation is available by upgrading affected packages to version 3.0.1.

CVE-2021-28484 at a Glance

CVE Identifier CVE-2021-28484
GHSA Identifier GHSA-8m9g-647g-5pxw
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Github.com/Yubico/yubihsm connector
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:U/RL:O/RC:R).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-28484

To remediate this vulnerability, upgrade all affected Github.com/Yubico/yubihsm connector dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/Yubico/yubihsm-connector fixed: 3.0.1
Upgrade github.com/Yubico/yubihsm-connector to 3.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/Yubico/yubihsm-connector

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-28484, inspect your project dependencies for Github.com/Yubico/yubihsm connector:

inspect dependencies for github.com/Yubico/yubihsm-connector

Analyze the terminal output to locate any version of Github.com/Yubico/yubihsm connector in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Github.com/Yubico/yubihsm connector, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An issue was discovered in the /api/connector endpoint handler in Yubico yubihsm-connector before 3.0.1 (in YubiHSM SDK before 2021.04). The handler did not validate the length of the request, which can lead to a state where yubihsm-connector becomes stuck in a loop waiting for the YubiHSM to send it data, preventing any further operations until the yubihsm-connector is restarted. An attacker can send 0, 1, or 2 bytes to trigger this.

CVE-2021-28484 Affected Github.com/Yubico/yubihsm connector Versions

1 component(s)
Fixed Versions:
3.0.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/Yubico/yubihsm-connector
Go
< 3.0.1
3.0.1

References

Frequently Asked Questions

What is CVE-2021-28484?
CVE-2021-28484 is a security vulnerability in Github.com/Yubico/yubihsm connector involving Infinite loop in Yubico yubihsm-connector under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Github.com/Yubico/yubihsm connector versions are affected?
Affected versions include releases prior to 3.0.1 across affected packages: github.com/Yubico/yubihsm-connector.
What version fixes CVE-2021-28484?
Upgrading to 3.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/Yubico/yubihsm-connector affected?
Yes, github.com/Yubico/yubihsm-connector is affected in releases prior to 3.0.1. Upgrade your dependency to 3.0.1 or later.
What is the CVSS score of CVE-2021-28484?
CVE-2021-28484 has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:U/RL:O/RC:R.
What CWE is associated with CVE-2021-28484?
CVE-2021-28484 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Go dependencies for CVE-2021-28484?
Run the dependency tree command: 'inspect dependencies for github.com/Yubico/yubihsm-connector'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8m9g-647g-5pxw",
  "modified" : "2021-05-07T16:04:45Z",
  "published" : "2022-02-15T01:57:18Z",
  "aliases" : [ "CVE-2021-28484" ],
  "summary" : "Infinite loop in Yubico yubihsm-connector",
  "details" : "An issue was discovered in the /api/connector endpoint handler in Yubico yubihsm-connector before 3.0.1 (in YubiHSM SDK before 2021.04). The handler did not validate the length of the request, which can lead to a state where yubihsm-connector becomes stuck in a loop waiting for the YubiHSM to send it data, preventing any further operations until the yubihsm-connector is restarted. An attacker can send 0, 1, or 2 bytes to trigger this.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:U/RL:O/RC:R"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/Yubico/yubihsm-connector"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-28484"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yubico/yubihsm-connector/commit/82bdf202c53460bac9106cc9b4b34a0a16cae0ed"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yubico/yubihsm-connector/releases"
  }, {
    "type" : "WEB",
    "url" : "https://www.yubico.com/support/security-advisories/ysa-2021-02"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-07T16:04:45Z",
    "nvd_published_at" : "2021-04-14T18:15:00Z"
  }
}