Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

429+ Articles
114+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-4599: jsrsasign Private Key Recovery via DSA Nonce Bias (CVSS 9.1)
CVE-2026-4599: jsrsasign Private Key Recovery via DSA Nonce Bias (CVSS 9.1)

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-4599

CVE-2026-4599: jsrsasign Private Key Recovery via DSA Nonce Bias (CVSS 9.1)

A critical flaw in jsrsasign versions 7.0.0 through 11.1.0 allows attackers to recover DSA private keys by exploiting biased nonce generation in the...

Dylan H.

Security Team

March 23, 2026
7 min read

Affected Products

  • jsrsasign 7.0.0 – 11.1.0 (npm)

Executive Summary

A critical cryptographic vulnerability (CVE-2026-4599) has been disclosed in the widely used JavaScript cryptography library jsrsasign, affecting all versions from 7.0.0 up to (but not including) 11.1.1. The flaw stems from an Incomplete Comparison with Missing Factors in the random number generation routines used during DSA signature operations, allowing an attacker who can observe sufficient DSA signatures to recover the signer's private key.

CVSS Score: 9.1 (Critical) CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-4599
CVSS Score9.1 (Critical)
CVSS 4.0 Score9.3
TypeIncomplete Comparison with Missing Factors (CWE-184)
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
Affected FunctionsgetRandomBigIntegerZeroToMax, getRandomBigIntegerMinToMax
Affected Filesrc/crypto-1.1.js
Libraryjsrsasign (npm: jsrsasign)
Affected Versions7.0.0 – 11.1.0
Fixed Version11.1.1
Published2026-03-23

Affected Products

PackageEcosystemAffected VersionsFixed Version
jsrsasignnpm7.0.0 – 11.1.011.1.1

Additional impacted products (via dependency):

  • Red Hat Migration Toolkit for Virtualization
  • Red Hat Quay 3

Any application that uses jsrsasign for DSA signature generation in the affected version range is vulnerable.


Technical Details

Root Cause

The functions getRandomBigIntegerZeroToMax and getRandomBigIntegerMinToMax in src/crypto-1.1.js perform range checks using compareTo() to ensure that randomly generated BigInteger candidates fall within specified bounds. Due to an incorrect comparison logic (missing factors in the comparison condition), candidates that fall outside the intended range are erroneously accepted.

How This Breaks DSA Security

In DSA (Digital Signature Algorithm), each signature operation requires a random per-signature value called a nonce (also called k). The security of DSA depends critically on the nonce being:

  1. Truly random — unpredictable to an attacker
  2. Strictly within bounds — the interval [1, q-1] where q is the DSA subgroup order

When the nonce generation accepts out-of-range values:

  • The nonce distribution becomes biased — certain values appear more frequently than others
  • An attacker who observes multiple DSA signatures can exploit this bias using lattice reduction techniques (e.g., the Lenstra–Lenstra–Lovász (LLL) algorithm)
  • With enough biased signatures, the attacker can solve for the private key x

Attack Chain

1. Attacker identifies a target service using jsrsasign 7.0.0–11.1.0
   for DSA signing (API endpoints, JWT issuance, document signing, etc.)
 
2. Attacker collects multiple DSA signatures from the target service
   (e.g., by submitting requests that trigger signing operations)
 
3. Each signature contains a nonce k that is slightly biased due to
   the incorrect compareTo logic in getRandomBigIntegerZeroToMax
 
4. Attacker applies lattice-based cryptanalysis (LLL / BKZ) to the
   collected (signature, message) pairs to exploit the nonce bias
 
5. After collecting sufficient signatures (number depends on bias
   magnitude and DSA key size), attacker recovers private key x
 
6. With private key x recovered, attacker can:
   - Forge arbitrary DSA signatures
   - Impersonate the signing entity for any message
   - Decrypt DSA-encrypted communications (in combined schemes)

CVSS Score Breakdown

MetricRatingRationale
Attack VectorNetworkKey recovery via observed signatures over any channel
Attack ComplexityLowStandard lattice attacks are well-documented and automated
Privileges RequiredNoneNo authentication needed to observe public signatures
User InteractionNonePassive observation of normal service output is sufficient
Confidentiality ImpactHighPrivate key exposure grants full impersonation capability
Integrity ImpactHighForged signatures undermine authentication and non-repudiation
Availability ImpactNoneNo direct availability impact

Related Vulnerabilities (Same Batch)

CVE-2026-4599 was disclosed alongside three additional jsrsasign vulnerabilities on 2026-03-23:

CVEDescriptionCVSS
CVE-2026-4601Missing Cryptographic Step in KJUR.crypto.DSA.signWithMessageHash — forces r or s to zero, emitting invalid signature without retry9.4
CVE-2026-4598Infinite loop via bnModInverse when given zero/negative input; permanent process hang7.5
CVE-2026-4603Division by zero via RSA/JWK parsing — deterministic zero output when modulus decodes to zero5.9

All four vulnerabilities are fixed in jsrsasign v11.1.1.


Impact Assessment

Impact AreaDescription
Private Key RecoveryAttacker recovers DSA private key via lattice cryptanalysis of biased nonces
Signature ForgeryWith the private key, attacker can forge valid DSA signatures for any message
Authentication BypassSystems relying on DSA-signed tokens/JWTs can be completely bypassed
Data IntegritySigned documents, transactions, or communications can be backdated or modified
Non-repudiation FailureLegitimate parties can no longer prove they signed something; attacker can deny
Supply Chain RiskRed Hat Quay and Migration Toolkit for Virtualization ship affected versions

Recommendations

Immediate Action

# Check your current jsrsasign version
npm list jsrsasign
 
# Upgrade to the patched version
npm install jsrsasign@11.1.1
 
# Verify the upgrade
npm list jsrsasign
# Should show: jsrsasign@11.1.1

Check for Transitive Dependencies

# Find all packages depending on jsrsasign
npm ls jsrsasign --all
 
# Or with pnpm
pnpm why jsrsasign
 
# Or with yarn
yarn why jsrsasign

Audit Signature Operations

If you used jsrsasign for DSA signing in the vulnerable version range:

  1. Assume private key compromise — treat any DSA key pair used with jsrsasign 7.0.0–11.1.0 as potentially recovered
  2. Rotate all affected DSA key pairs — generate new keys using a trusted, patched implementation
  3. Revoke old certificates — if the DSA keys were certified (PKI), request revocation from your CA
  4. Re-issue signed artifacts — any documents, JWTs, or tokens signed with the old keys should be re-signed with new keys
  5. Review audit logs — check for unusual signature verification activity that may indicate exploitation

Consider Migration to ECDSA

DSA as an algorithm has been increasingly deprecated in favor of ECDSA and EdDSA (Ed25519):

// Instead of DSA signing, prefer EdDSA (Ed25519) or ECDSA (P-256)
// using the Web Crypto API or a modern library like @noble/curves
 
import { ed25519 } from '@noble/curves/ed25519';
 
// Generate key pair
const privKey = ed25519.utils.randomPrivateKey();
const pubKey = ed25519.getPublicKey(privKey);
 
// Sign
const msg = new Uint8Array([1, 2, 3]);
const sig = ed25519.sign(msg, privKey);
 
// Verify
ed25519.verify(sig, msg, pubKey);  // true

Detection Indicators

IndicatorDescription
High-frequency signature requests from a single IPPotential lattice attack data collection
jsrsasign version < 11.1.1 in package.json or package-lock.jsonVulnerable version in use
DSA key pairs in use with web servicesAssess whether observable signatures are produced
Unexpected token validation failuresPossible signature forgery attempts

Post-Remediation Checklist

  1. Upgrade jsrsasign to 11.1.1 in all projects
  2. Update package-lock.json or yarn.lock and commit
  3. Rotate all DSA key pairs used with the vulnerable library
  4. Revoke and reissue any certificates or tokens signed with the old keys
  5. Update CI/CD pipelines and Docker images to use the patched version
  6. Run npm audit to confirm no further known vulnerabilities
  7. If running Red Hat Quay or Migration Toolkit, apply Red Hat's security errata

References

  • NIST NVD — CVE-2026-4599
  • jsrsasign Private Key Recovery via DSA Nonce Bias — TheHackerWire
  • CVE-2026-4599 — THREATINT
  • CWE-184: Incomplete List of Disallowed Inputs
#CVE-2026-4599#jsrsasign#Cryptography#DSA#Private Key Recovery#npm#NVD#Critical

Related Articles

CVE-2026-27876 — Grafana Critical RCE via SQL Expression Chain

A chained attack exploiting SQL Expressions combined with a Grafana Enterprise plugin can lead to remote arbitrary code execution. All Grafana users should update immediately to close this attack vector.

5 min read

CVE-2026-33875: Gematik Authenticator Authentication Flow Hijacking (CVSS 9.3)

A critical vulnerability in Gematik Authenticator prior to version 4.16.0 allows attackers to hijack authentication sessions via malicious deep links, potentially authenticating as victim users without their credentials.

5 min read

CVE-2026-33669: SiYuan Unauthenticated Document Content Exposure (CVSS 9.8)

A critical unauthenticated information disclosure vulnerability in SiYuan, the personal knowledge management system, allows remote attackers to retrieve document IDs via the readDir API and then read the full content of any document. Patched in version 3.6.2.

4 min read
Back to all Security Alerts