Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-21895

CVE-2026-21895: Rust RSA Crate Input Validation Vulnerability

CVE-2026-21895 is an input validation flaw in the Rust RSA crate that causes panics when creating RSA private keys with invalid prime values. This post explains its impact, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2026-21895 Overview

The rsa crate, a pure Rust implementation of the RSA cryptographic algorithm, contains a vulnerability in the RSA private key construction routine. Prior to version 0.9.10, when creating an RSA private key from its components, the implementation panics instead of returning an error when one of the primes is 1. This improper error handling condition (CWE-703) can lead to denial of service when applications process malformed or malicious key material.

Critical Impact

Applications using vulnerable versions of the Rust rsa crate may crash unexpectedly when processing RSA private keys containing a prime value of 1, leading to denial of service conditions.

Affected Products

  • Rust rsa crate versions prior to 0.9.10
  • Applications and libraries depending on vulnerable rsa crate versions
  • RustCrypto RSA implementations using num-bigint-dig prior to version 0.8.6

Discovery Timeline

  • 2026-01-08 - CVE-2026-21895 published to NVD
  • 2026-01-08 - Last updated in NVD database

Technical Details for CVE-2026-21895

Vulnerability Analysis

This vulnerability represents an improper handling of exceptional conditions (CWE-703) within the Rust rsa crate's private key construction logic. When an application attempts to create an RSA private key from component values, the code path does not properly validate that the prime factors are valid values. Specifically, if one of the prime values equals 1, the implementation triggers a panic rather than returning a controlled error that calling code can handle gracefully.

In Rust, a panic typically causes the current thread to unwind and terminate, which can crash the entire application if not caught at a higher level. This behavior is particularly problematic in server applications or cryptographic services that may process key material from untrusted sources.

Root Cause

The root cause is insufficient input validation in the RSA private key construction function. The code assumes that prime values will always be mathematically valid (greater than 1), but does not enforce this constraint before proceeding with operations that cannot handle the edge case. When a prime equals 1, subsequent mathematical operations produce unexpected results that trigger a panic condition.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Crafting malformed RSA key material with a prime value set to 1
  2. Submitting this key data to an application that uses the vulnerable rsa crate
  3. The application attempts to construct an RsaPrivateKey from the components
  4. The validation failure causes a panic, crashing the application thread or process

The fix in version 0.9.10 updates the dependency on num-bigint-dig and adds proper validation:

text
 rust-version = "1.65"
 
 [dependencies]
-num-bigint = { version = "0.8.2", features = ["i128", "prime", "zeroize"], default-features = false, package = "num-bigint-dig" }
+num-bigint = { version = "0.8.6", features = ["i128", "prime", "zeroize"], default-features = false, package = "num-bigint-dig" }
 num-traits = { version= "0.2.9", default-features = false, features = ["libm"] }
 num-integer = { version = "0.1.39", default-features = false }
 rand_core = { version = "0.6.4", default-features = false }

Source: GitHub Commit Update

Detection Methods for CVE-2026-21895

Indicators of Compromise

  • Application crashes with Rust panic stack traces referencing RSA key construction
  • Log entries showing thread panics in cryptographic modules handling key material
  • Unexpected process terminations in services processing RSA private keys

Detection Strategies

  • Review Cargo.lock files for rsa crate versions below 0.9.10
  • Use cargo audit to scan Rust projects for known vulnerable dependencies
  • Monitor application logs for panic messages related to RSA operations
  • Implement crash monitoring for services that process cryptographic key material

Monitoring Recommendations

  • Enable panic logging and alerting in production Rust applications
  • Monitor service availability and restart frequency for cryptographic services
  • Set up dependency scanning in CI/CD pipelines to detect vulnerable crate versions
  • Review incoming key material for anomalous prime values in security-critical applications

How to Mitigate CVE-2026-21895

Immediate Actions Required

  • Upgrade the rsa crate to version 0.9.10 or later immediately
  • Run cargo update -p rsa to update the dependency in your project
  • Review and test applications that process RSA keys from external sources
  • Consider implementing input validation before passing key components to the RSA library

Patch Information

The vulnerability is fixed in rsa crate version 0.9.10. The fix ensures proper error handling when invalid prime values are encountered during RSA private key construction. The patch updates the num-bigint-dig dependency from version 0.8.2 to 0.8.6 and adds validation logic to return an error instead of panicking. For complete technical details, see the GitHub Security Advisory GHSA-9c48-w39g-hm26 and the fix commit.

Workarounds

  • Implement input validation to verify prime values are greater than 1 before passing to RSA functions
  • Use std::panic::catch_unwind to catch panics in cryptographic code paths (not recommended for production)
  • Isolate RSA key processing in separate threads or processes to limit crash impact
  • Consider using alternative RSA implementations while upgrading
bash
# Update the rsa crate to the fixed version
cargo update -p rsa

# Verify the installed version
cargo tree -p rsa

# Audit dependencies for known vulnerabilities
cargo audit

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechRsa

  • SeverityLOW

  • CVSS Score2.7

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-703
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-9c48-w39g-hm26
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English