CVE-2021-41117
JavaScript vulnerability analysis and mitigation

Overview

CVE-2021-41117 is a critical vulnerability discovered in the keypair library, an open-source SSH key generation library that allows users to create RSA keys for authentication purposes. The vulnerability was discovered in September 2021 and disclosed on October 11, 2021. It affected keypair versions up to and including 1.0.3, impacting the GitKraken git GUI client versions 7.6.x, 7.7.x, and 8.0.0 released between May 12, 2021, and September 27, 2021 (GitHub Advisory, Security Lab).

Technical details

The vulnerability stems from a bug in the pseudo-random number generator used by the keypair library. The main flaw lies in incorrect encoding of output from a Lehmer LCG random number generator, resulting in approximately 97% of the bytes being converted to zeros due to a double String.fromCharCode implementation. The issue was particularly severe because the library failed to properly utilize the node's CSPRNG in NodeJS environments and instead relied on an insecure fallback path. The vulnerability received a CVSS score of 8.7 (High) according to GitHub's assessment, while the NVD rated it at 9.1 (Critical) (Hacker News, Security Lab).

Impact

The vulnerability resulted in the generation of weak RSA keys that were relatively easy to guess, potentially allowing attackers to decrypt confidential messages or gain unauthorized access to victims' accounts. The impact was so significant that GitHub, Microsoft Azure DevOps, GitLab, and Atlassian Bitbucket had to initiate mass revocations of SSH keys connected to accounts where the GitKraken client was used (Hacker News).

Exploitability

While there was no evidence of the vulnerability being exploited in the wild, the weak key generation made it theoretically possible for attackers to predict or guess the generated RSA keys. The vulnerability was particularly concerning due to its implementation in the GitKraken client, which was widely used for accessing various Git services (Security Lab).

Mitigation and workarounds

The vulnerability was patched in keypair version 1.0.4 and GitKraken version 8.0.1. Users were advised to review and remove all old GitKraken-generated SSH keys stored locally and generate new SSH keys using GitKraken 8.0.1 or later for each of their Git service providers. GitHub also implemented protections to prevent vulnerable versions of GitKraken from adding newly generated weak keys (Hacker News).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48170CRITICAL9.1
  • JavaScript logoJavaScript
  • scim-patch
NoYesAug 07, 2026
CVE-2026-48007HIGH8.6
  • JavaScript logoJavaScript
  • @element-hq/element-call-embedded
NoYesAug 07, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • gemini-cli
NoYesAug 07, 2026
CVE-2026-71850MEDIUM4.8
  • JavaScript logoJavaScript
  • langfuse-fips-4
NoYesAug 07, 2026
CVE-2026-71849LOW3.7
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026

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