CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (2024)

Update: As of January 12, 2023

The vulnerability in JsonWebToken, CVE-2022-23529, discovered by Unit 42 researchers on January 9, 2023, has been revoked. It says that if specific conditions meet, an attacker could potentially execute code on a server verifying a malicious JSON web token request.

However, the likelihood of this happening in real-world situations is considered low due to the specific requirements needed for exploitation.

After careful consideration, it has been decided that the vulnerability is invalid, and CVE-2022-23529 is being revoked. However, the revocation may take some time to propagate throughout the entire system.

The maintainers and researchers are also updating their respective advisories to include more context around the issue and potential exploitation.

Introduction

On the 9th of January 2023, security researchers from Unit 42 disclosed a high vulnerability in JSON Web Token (JWT) libraries. JsonWebToken is an open-source project that aims to create web tokens. The vulnerability, tracked as CVE-2022-23529, allows attackers to bypass the verification of JWT tokens, potentially leading to remote code execution (RCE) on a server.

Initially, the vulnerability had a high severity rating and an EPSS score of 0.108550000. However, after further investigation, it has been concluded that no prerequisites can allow an attacker to perform exploitation of the vulnerability in real-world applications.

Everything you need to know about JsonWebToken

The JsonWebToken package is an open-source JavaScript package that allows users to verify and sign JWTs. It’s primarily used for authentication and authorization purposes.

In other words, a simple and compact way to securely transmit information is the JSON Web Token. It can be used for various purposes, such as authentication, authorization and exchange of information. Furthermore, the compact size of the JSON object allows it to be transferred in various ways, such as in POST parameters, URLs, and HTTP headers.

Auth0 is responsible for maintaining and developing this library, which is written in JavaScript and supports various platforms, such as browser-based applications and node.js. In addition, this library provides a set of APIs that allow developers to create JWT tokens easily. With this, they can quickly and securely implement user authentication systems and integrate them with third-party services.

What is JWT 101?

JWT refers to an open standard that enables people to transfer data by encoding and signing JSON data securely. A JSON object is created to express trust between two parties, such as an online application and a service provider. Its string structure is composed of three separate parts:

Header.Payload.Signature

Header – This contains information about how the JWT is encoded. The encoded JWT is typically represented by two parts. The first is the token type, and the second is the signing algorithm used.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (1)

Payload – This contains the claims. These statements typically include information about an entity or metadata. There are three different types of claims, namely, public, private, or registered claims.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (2)

Signature – This is done to ensure the message isn’t altered along the route and to confirm that the sender of the JWT is who they claim to be. The header and payload are used to create the signature.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (3)

About the vulnerability (CVE-2022-23529)

A typical attack on JWT involves using different forgery techniques. In addition, the techniques used in these attacks usually involve abusing the buggy implementations of JWT. These attacks carry severe consequences, as a successful attack can allow an attacker access to sensitive information, such as confidential information or steal and/or modify data.

The JsonWebToken package provides a method called verify, which checks the validity of JWT. It receives three parameters: token, options, and secretOrPublicKey. It verifies the validity of a JWT and returns its decoded payload part.

The values of the privacy-enhanced mail (PEM) file will be assigned based on the secretOrPublickey parameter when no options algorithms are provided in the list. The issue is that the secretOrPublicKey parameter needs to be put in place to ensure that it is a valid PEM file’s content. This means that the toString method used by this unverified object is being blindly used. Attackers can provide their own toString method to the JsonWebToken’s verify process.

The CVE is not remotely exploitable as it requires an attacker to create an object within the context of an application to execute malicious code, which means that instead of just parsing JSON, they have to implement an executable function. This can only be performed if the attacker can modify the source code, and if they can, they can directly execute the malicious code.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (4)

How does JWT authentication work?

When a user logs in using a password or username, the server validates their credentials and creates a signed JWT with a secret key. This will be stored in a different location. Subsequently, the user will be asked to provide a secret key by the JWT, which will be used to verify the request. Finally, the server will use the secret key stored to verify if the token is valid or not.

Prerequisites for exploitation

The vulnerability requires several prerequisites to be exploitable, such as using a specific algorithm and a specific configuration of the JWT library. However, the fact that JWT is widely used in many applications and that the vulnerability can lead to RCE makes it a critical issue that should be addressed as soon as possible.

A few prerequisites must be met to exploit the vulnerability:

  1. Secret keys are not securely stored on the server.
  2. The attacker needs to have access to and control the secret keys.

These requirements imply that an application is insecure, which means it can be exploited regardless of the vulnerability.

When can an attacker perform an exploit?

The attacker can create a malicious token to access the server if the prerequisites are met.

After taking the requested token as input, the server uses the verify() procedure to determine if the secret key is correct.

The three parameters used in the verify() method are token, option, and secretOrPublicKey. When the algorithm in the option is empty, the values from the secretOrPublicKey will be assigned instead.

The toString() method returns a string that represents an object that has been represented. If the object has not been shown, the user implementation will be triggered.

How to fix CVE-2022-23529- JsonWebToken

To mitigate the vulnerability, affected organizations should update their JWT libraries to the latest version, including a fix for this issue. Additionally, they should review their applications and systems using JWT, verify that they are properly configured, and use recommended algorithms and libraries.

The technical details of the vulnerability indicate that it affects all the versions of the Json Web Token Library below 8.5.1 or an earlier version. Therefore, to fix the issue, the community is urged to migrate the library to a newer version and suggest updating to JsonWebToken library 9.0.0, which includes a fix for this vulnerability.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (5)

Do you need to worry about CVE-2022-23529?

The affected package is very popular, with over 20 thousand dependents and over 10 million weekly downloads. The prerequisites for this vulnerability are less likely to be met, as attackers cannot easily access and control the secret keys. If they could do so, they could create their own key and would not need to exploit this issue.

The security community generally believes that the vulnerability is exaggerated, and it is unlikely that an exploit would occur in the wild.

Although there’s no cause for alarm, it’s still important to practice good security hygiene and patch this vulnerability.

In conclusion, the CVE-2022-23529 vulnerability is a high issue that can lead to RCE on a server that verifies maliciously crafted JWT tokens. Organizations should take immediate steps to update their JWT libraries and review their applications and systems that use JWT to ensure that they are properly configured and protected against this vulnerability.

How PingSafe detects vulnerabilities in seconds

PingSafe’s platform can help you identify and prevent critical vulnerabilities in your cloud computing infrastructure. Through its Container Security and Vulnerability Management, it can identify and prioritize the most vulnerable components of your cloud infrastructure and respond immediately.

You can protect yourself from zero-day attacks, maintain an up-to-date view of the cloud computing environment, and improve your cloud security posture with the help of PingSafe’s platform.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (6)

Sign up for a personalized PingSafe demo to learn more.

Subscribe to our newsletter

Get the latest updates on cloud security, critical vulnerabilities, new features, and more.

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (7)

CVE-2022-23529 - Revocation of JsonWebToken Vulnerability 2023 (2024)

FAQs

What is the JWT token vulnerability CVE? ›

About the vulnerability (CVE-2022-23529)

These attacks carry severe consequences, as a successful attack can allow an attacker access to sensitive information, such as confidential information or steal and/or modify data. The JsonWebToken package provides a method called verify, which checks the validity of JWT.

What is the CVE 2022 26923 vulnerability? ›

CVE-2022-26923 is a privilege escalation vulnerability discovered by Oliver Lyak. Exploitation relies on two primary actions: Changing of a computer account's dNSHostName to match that of another computer account.

What is the CVE 2022 2068 vulnerability? ›

CVE-2022-2068 is a critical shell command injection vulnerability found in the c_rehash script distributed by some operating systems, including OpenSSL, Debian Linux, and Fedora.

What is the CVE 2022 24785 vulnerability? ›

CVE-2022-24785 is a path traversal vulnerability with a severity rating of 7.5 (HIGH) according to CVSS Version 3. x, affecting Moment. js, a popular JavaScript date library. This vulnerability specifically impacts npm (server) users of Moment.

Is JWT token hackable? ›

It is used literally everywhere: from sessions to token-based authentication in OAuth, to custom authentication of all shapes and forms. There is actually a pretty good reason for this wide adoption and that is, for the most part, security and resilience. However, just like any technology, JWT is not immune to hacking.

How do I keep my JWT token safe? ›

To keep them secure, you should always store JWTs inside an HttpOnly cookie. This is a special kind of cookie that's only sent in HTTP requests to the server. It's never accessible (both for reading and writing) from JavaScript running in the browser.

What is the most popular CVE 2022? ›

What were the Top Vulnerabilities of 2022?
  • Log4Shell/Log4j (CVE-2021-44228) ...
  • Google Chrome Zero Day (CVE-2022-0609) ...
  • Apple Out of Bounds Write (CVE-2022-42827) ...
  • Microsoft Exchange Privilege Escalation (CVE-2022-41080) ...
  • F5 BIG-IP iControl REST RCE (CVE-2022-1388) ...
  • Microsoft Follina MSDT Bug (CVE-2022-30190)
Nov 7, 2023

What is the new vulnerability in 2022? ›

CVE-2022-24816

OSGeo GeoServer JAI-EXT Code Injection Vulnerability: OSGeo GeoServer JAI-EXT contains a code injection vulnerability that, when programs use jt-jiffle and allow Jiffle script to be provided via network request, could allow remote code execution.

What is the vulnerability of CVE 2022 23943? ›

Out-of-bounds Write vulnerability in mod_sed of Apache HTTP Server allows an attacker to overwrite heap memory with possibly attacker provided data. This issue affects Apache HTTP Server 2.4 version 2.4. 52 and prior versions.

What is the CVE 2022 22127 exploit? ›

CVE-2022-22127

The vulnerability allows a malicious site administrator to change passwords for users in different sites hosted on the same Tableau Server, resulting in the potential for unauthorized access to data. Tableau Server versions affected are:2020.4. 16, 2021.1. 13, 2021.2.

What is the vulnerability of CVE 2022 42004? ›

CVE-2022-42004 is a high-severity vulnerability affecting systems using the FasterXML jackson-databind library before version 2.13. 4. This vulnerability can lead to resource exhaustion due to a lack of checks in the BeanDeserializer. \_deserializeFromArray function, which prevents the use of deeply nested arrays.

What is CVE 2022 40674? ›

A vulnerability was found in expat. With this flaw, it is possible to create a situation in which parsing is suspended while substituting in an internal entity so that XML_ResumeParser directly uses the internalEntityProcessor as its processor.

What is CVE 2022 22947? ›

In spring cloud gateway versions prior to 3.1. 1+ and 3.0. 7+ , applications are vulnerable to a code injection attack when the Gateway Actuator endpoint is enabled, exposed and unsecured.

What is CVE 2022 47966? ›

Multiple Zoho ManageEngine on-premise products, such as ServiceDesk Plus through 14003, allow remote code execution due to use of Apache Santuario xmlsec (aka XML Security for Java) 1.4.

What is CVE 2022 32917? ›

CVE-2022-32917 is a high-severity vulnerability affecting Apple devices running certain versions of iPadOS, iPhone OS, and macOS. This security flaw allows an application to potentially execute arbitrary code with kernel privileges, which could lead to unauthorized access and control over the affected system.

What is a JWT token in cyber security? ›

A JSON Web Token (JWT) is a compact, URL-safe means of representing claims securely between two parties. These claims are typically used in authentication and authorization scenarios. A JWT is made up of three main parts: a header, a payload, and a signature. Each part is encoded as a JSON object.

What is a CVE vulnerability? ›

CVE stands for Common Vulnerabilities and Exposures. CVE is a glossary that classifies vulnerabilities. The glossary analyzes vulnerabilities and then uses the Common Vulnerability Scoring System (CVSS) to evaluate the threat level of a vulnerability.

What is the security issue of JWT? ›

JWT attacks involve a user sending modified JWTs to the server in order to achieve a malicious goal. Typically, this goal is to bypass authentication and access controls by impersonating another user who has already been authenticated.

What is JWT token error? ›

This error occurs if the JSON Web Token (JWT) specified in the <Source> element of the Decode JWT policy is malformed, invalid or otherwise not decodable. A properly structured JWT should contain a header, payload and signature in the following format: header.

Top Articles
Why Rich And Wealthy Are Not The Same
FHA Loans: Definition, Requirements, Limits | Bankrate
Fighter Torso Ornament Kit
Bank Of America Financial Center Irvington Photos
Rubratings Tampa
Sandrail Options and Accessories
Gabriel Kuhn Y Daniel Perry Video
The Potter Enterprise from Coudersport, Pennsylvania
Tugboat Information
Craigslist Estate Sales Tucson
Transformers Movie Wiki
Oppenheimer Showtimes Near Cinemark Denton
Hijab Hookup Trendy
Nj State Police Private Detective Unit
Blackwolf Run Pro Shop
Schedule 360 Albertsons
Indystar Obits
Quadcitiesdaily
1973 Coupe Comparo: HQ GTS 350 + XA Falcon GT + VH Charger E55 + Leyland Force 7V
Mega Personal St Louis
Yugen Manga Jinx Cap 19
Craigslist Panama City Beach Fl Pets
Bolsa Feels Bad For Sancho's Loss.
Tuw Academic Calendar
Nk 1399
R/Airforcerecruits
Jamielizzz Leaked
Ewg Eucerin
Calvin Coolidge: Life in Brief | Miller Center
FSA Award Package
Grand Teton Pellet Stove Control Board
Average weekly earnings in Great Britain
Gr86 Forums
Murphy Funeral Home & Florist Inc. Obituaries
Litter-Robot 3 Pinch Contact & DFI Kit
Craigslist Hamilton Al
Why The Boogeyman Is Rated PG-13
Best Restaurant In Glendale Az
The Best Restaurants in Dublin - The MICHELIN Guide
The TBM 930 Is Another Daher Masterpiece
15 Best Things to Do in Roseville (CA) - The Crazy Tourist
Puretalkusa.com/Amac
COVID-19/Coronavirus Assistance Programs | FindHelp.org
Unblocked Games Gun Games
Brauche Hilfe bei AzBilliards - Billard-Aktuell.de
Csgold Uva
Florida Lottery Powerball Double Play
Chubbs Canton Il
Noga Funeral Home Obituaries
SF bay area cars & trucks "chevrolet 50" - craigslist
32 Easy Recipes That Start with Frozen Berries
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6304

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.