Skip to content

Commit 4536a6e

Browse files
committed
CVE-2022-25898 Security fix in JWS and JWT validation
1 parent 3edc007 commit 4536a6e

22 files changed

+1425
-1281
lines changed

ChangeLog.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11

22
ChangeLog for jsrsasign
33

4+
CVE-2022-25898 Security fix in JWS and JWT validation
5+
* Changes from 10.5.24 to 10.5.25 (2022-Jun-23)
6+
- src/jws.js
7+
- JWS.verify and JWS.verifyJWT
8+
- CVE-2022-25898 SECURITY FIX:
9+
verify and verifyJWT may accept signature with special characters
10+
or \number characters by mistake.
11+
Please see security advisory:
12+
https://github.com/kjur/jsrsasign/security/advisories/GHSA-3fvg-4v2m-98jf
13+
- src/base64x.js
14+
- function isBase64URLDot added
15+
- test/qunit-do-jwt-veri.html
16+
417
X509.getParam bugfix for v1 certificate
518
* Changes from 10.5.23 to 10.5.24 (2022-Jun-04)
619
- src/x509.js

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ HIGHLIGHTS
3939
- no dependency to other library
4040
- no dependency to [W3C Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) nor [OpenSSL](https://www.openssl.org/)
4141
- no dependency on newer ECMAScirpt function. So old browsers also supported.
42-
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2022-06-01)
42+
- very popular crypto library with [0.6M+ npm downloads/month](https://npm-stat.com/charts.html?package=jsrsasign&from=2016-05-01&to=2022-06-20)
4343

4444
INSTALL
4545
-------
@@ -78,6 +78,7 @@ MORE TUTORIALS AND SAMPLES
7878

7979
|published|fixed version|title/advisory|CVE|CVSS|
8080
|:---|:---|:---|:---|:---|
81+
|2022Jun24|10.5.25|[JWS and JWT signature validation vulnerability with special characters](https://github.com/kjur/jsrsasign/security/advisories/GHSA-3fvg-4v2m-98jf)|CVE-2022-25898|?|
8182
|2021Apr14|10.2.0|[RSA signature validation vulnerability on maleable encoded message](https://github.com/kjur/jsrsasign/security/advisories/GHSA-27fj-mc8w-j9wg)|CVE-2021-30246|9.1|
8283
|2020Jun22|8.0.19|[ECDSA signature validation vulnerability by accepting wrong ASN.1 encoding](https://github.com/kjur/jsrsasign/security/advisories/GHSA-p8c3-7rj8-q963)|CVE-2020-14966|5.5|
8384
|2020Jun22|8.0.18|[RSA RSAES-PKCS1-v1_5 and RSA-OAEP decryption vulnerability with prepending zeros](https://github.com/kjur/jsrsasign/security/advisories/GHSA-xxxq-chmp-67g4)|CVE-2020-14967|4.8|

api/files.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ <h2><a href="symbols/src/base64x-1.1.js.html">base64x-1.1.js</a></h2>
681681

682682

683683
<dt class="heading">Version:</dt>
684-
<dd>jsrsasign 10.5.23 base64x 1.1.29 (2022-May-27)</dd>
684+
<dd>jsrsasign 10.5.25 base64x 1.1.30 (2022-Jun-23)</dd>
685685

686686

687687

@@ -776,7 +776,7 @@ <h2><a href="symbols/src/jws-3.3.js.html">jws-3.3.js</a></h2>
776776

777777

778778
<dt class="heading">Version:</dt>
779-
<dd>jsrsasign 8.0.3 jws 3.3.11 (2018-Mar-11)</dd>
779+
<dd>jsrsasign 10.5.25 jws 3.3.12 (2022-Jun-23)</dd>
780780

781781

782782

api/symbols/global__.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,16 @@ <h1 class="classTitle">
879879
</td>
880880
</tr>
881881

882+
<tr>
883+
<td class="attributes">&lt;static&gt; &nbsp;</td>
884+
<td class="nameDescription">
885+
<div class="fixedFont"><b><a href="../symbols/global__.html#.isBase64URLDot">isBase64URLDot</a></b>(s)
886+
</div>
887+
<div class="description">check whether a string is a base64url encoded string and dot or not<br/>
888+
Input string can conclude new lines or space characters.</div>
889+
</td>
890+
</tr>
891+
882892
<tr>
883893
<td class="attributes">&lt;static&gt; &nbsp;</td>
884894
<td class="nameDescription">
@@ -3184,6 +3194,66 @@ <h1 class="classTitle">
31843194

31853195

31863196

3197+
<hr />
3198+
3199+
<a name=".isBase64URLDot"> </a>
3200+
<div class="fixedFont">&lt;static&gt;
3201+
3202+
<span class="light">{Boolean}</span>
3203+
<b>isBase64URLDot</b>(s)
3204+
3205+
</div>
3206+
<div class="description">
3207+
check whether a string is a base64url encoded string and dot or not<br/>
3208+
Input string can conclude new lines or space characters.
3209+
3210+
<br />
3211+
<i>Defined in: </i> <a href="../symbols/src/base64x-1.1.js.html">base64x-1.1.js</a>.
3212+
3213+
3214+
</div>
3215+
3216+
3217+
3218+
<pre class="code">isBase64URLDot("YWE") &rarr; true
3219+
isBase64URLDot("YWE.YWE.YWE") &rarr; true
3220+
isBase64URLDot("YW-") &rarr; true
3221+
isBase64URLDot("YW+") &rarr; false</pre>
3222+
3223+
3224+
3225+
3226+
<dl class="detailList">
3227+
<dt class="heading">Parameters:</dt>
3228+
3229+
<dt>
3230+
<span class="light fixedFont">{String}</span> <b>s</b>
3231+
3232+
</dt>
3233+
<dd>input string</dd>
3234+
3235+
</dl>
3236+
3237+
3238+
3239+
<dl class="detailList">
3240+
<dt class="heading">Since:</dt>
3241+
<dd>base64x 1.1.30 jsrsasign 10.5.25</dd>
3242+
</dl>
3243+
</dl>
3244+
3245+
3246+
3247+
<dl class="detailList">
3248+
<dt class="heading">Returns:</dt>
3249+
3250+
<dd><span class="light fixedFont">{Boolean}</span> true if a string "s" is a base64url encoded string and dot otherwise false</dd>
3251+
3252+
</dl>
3253+
3254+
3255+
3256+
31873257
<hr />
31883258

31893259
<a name=".ishex"> </a>

0 commit comments

Comments
 (0)