CVE-2023-48223

MediumCVSS 5.9/10Last modified Jun 17, 2026

Description

fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to version 3.3.2, the fast-jwt library does not properly prevent JWT algorithm confusion for all public key types. The 'publicKeyPemMatcher' in 'fast-jwt/src/crypto.js' does not properly match all common PEM formats for public keys. To exploit this vulnerability, an attacker needs to craft a malicious JWT token containing the HS256 algorithm, signed with the public RSA key of the victim application. This attack will only work if the victim application utilizes a public key containing the `BEGIN RSA PUBLIC KEY` header. Applications using the RS256 algorithm, a public key with a `BEGIN RSA PUBLIC KEY` header, and calling the verify function without explicitly providing an algorithm, are vulnerable to this algorithm confusion attack which allows attackers to sign arbitrary payloads which will be accepted by the verifier. Version 3.3.2 contains a patch for this issue. As a workaround, change line 29 of `blob/master/src/crypto.js` to include a regular expression.

Metrics

CVSS 3.1 5.9/10CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Weakness enumeration

Affected software

No affected versions have been published.

Timeline

Published
Nov 20, 2023
Last modified
Jun 17, 2026
NVD status
Modified

Related CVEs from 2023

CVE-2023-482249.1Fides is an open-source privacy engineering platform for managing the fulfillment of data privacy requests in a runtime environment, and theCVE-2023-482259.1Laf is a cloud development platform. Prior to version 1.0.0-beta.13, the control of LAF app enV is not strict enough, and in certain scenariCVE-2023-482263.5OpenReplay is a self-hosted session replay suite. In version 1.14.0, due to lack of validation Name field - Account Settings (for registratiCVE-2023-482274.3Umbraco is an ASP.NET content management system (CMS). Starting in version 8.0.0 and prior to versions 8.18.10, 10.7.0, and 12.3.0, BackoffiCVE-2023-482289.8authentik is an open-source identity provider. When initialising a oauth2 flow with a `code_challenge` and `code_method` (thus requesting PKCVE-2023-482297.6Contiki-NG is an open-source, cross-platform operating system for Next-Generation IoT devices. An out-of-bounds write exists in the driver fCVE-2023-48235.4The WP Meta and Date Remover WordPress plugin before 2.2.0 provides an AJAX endpoint for configuring the plugin settings. This endpoint has CVE-2023-482309.8Cap'n Proto is a data interchange format and capability-based RPC system. In versions 1.0 and 1.0.1, when using the KJ HTTP library with WebCVE-2023-482314.3Vim is an open source command line text editor. When closing a window, vim may try to access already freed window structure. Exploitation beCVE-2023-482324.3Vim is an open source command line text editor. A floating point exception may occur when calculating the line offset for overlong lines andCVE-2023-482334.3Vim is an open source command line text editor. If the count after the :s command is larger than what fits into a (signed) long variable, abCVE-2023-482344.3Vim is an open source command line text editor. When getting the count for a normal mode z command, it may overflow for large counts given.
CVE-2023-48223: Medium severity, CVSS 5.9 | Vulnix