CVE-2022-25898
JavaScript vulnerability analysis and mitigation

Overview

The vulnerability CVE-2022-25898 affects the jsrsasign package versions before 10.5.25. This security flaw was discovered in June 2022 and involves improper verification of cryptographic signatures in JSON Web Signatures (JWS) and JSON Web Tokens (JWT). The vulnerability allows non-Base64URL encoding special characters or number escaped characters to be incorrectly validated as valid signatures (NVD, Snyk).

Technical details

The vulnerability stems from improper validation of JWS and JWT signatures, where the verification methods JWS.verify() and JWS.verifyJWT() may incorrectly accept signatures containing special characters or escaped numeric characters that don't conform to Base64URL encoding standards. The issue has been assigned a CVSS v3.1 base score of 9.8 (CRITICAL) by NVD and 7.7 (HIGH) by Snyk, indicating its severe impact on system security (NVD, Snyk).

Impact

The vulnerability could allow attackers to bypass signature verification mechanisms, potentially leading to unauthorized access or manipulation of protected resources. This could compromise the integrity and authenticity of JWT-based authentication systems, affecting applications that rely on jsrsasign for cryptographic operations (Snyk).

Mitigation and workarounds

The primary mitigation is to upgrade jsrsasign to version 10.5.25 or higher, which includes the security fix. As a workaround, developers should validate that JWS or JWT signatures contain only Base64URL and dot-safe strings before executing JWS.verify() or JWS.verifyJWT() methods (GitHub Release, GitHub Commit).

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-2025-55182CRITICAL10
  • JavaScriptJavaScript
  • react
NoYesDec 03, 2025
CVE-2025-66401CRITICAL9.8
  • JavaScriptJavaScript
  • mcp-watch
NoNoDec 01, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66405MEDIUM6.9
  • JavaScriptJavaScript
  • @portkey-ai/gateway
NoYesDec 01, 2025

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