Beyond the Radar: Join GigaOm and Cynet May 6th
Why Cynet
Our Valued Partners
Industry Validation
Platform
Solutions
Prevent, detect, and remediate threats automatically.
Detect and isolate suspicious traffic instantly.
Identify misconfigurations and risks before attackers do.
Block phishing and malicious attachments.
Extend protection to every device.
Stop credential theft and lateral movement.
Pre-built playbooks and automated workflows that reduce manual effort.
Partners
Resources
Resource Center
Company
Why Cynet
Our Valued Partners
Industry Validation
Platform
Solutions
Prevent, detect, and remediate threats automatically.
Detect and isolate suspicious traffic instantly.
Identify misconfigurations and risks before attackers do.
Block phishing and malicious attachments.
Extend protection to every device.
Stop credential theft and lateral movement.
Pre-built playbooks and automated workflows that reduce manual effort.
Partners
Resources
Resource Center
Company
Subscribe to get the latest updates and resources
[Update] This CVE advisory was withdrawn on Jan. 27, 2023, after the blog below was published on Jan. 17.
JsonWebToken (JWT) is a standard for creating access tokens to securely transmit information between two parties. It is commonly used to authenticate users and provide them with secure access to resources.
JsonWebToken is a JSON-encoded representation mostly used for managing authorization. It will be implemented in the node.js open-source server.
The authorization is signed digitally by the server and consumed by the client browser. Each token is also signed using RSA encryption (hashing).
Encrypting a JsonWebToken requires their public RSA key. The decryption takes place with the corresponding private RSA key, which the user must keep secret.
A new vulnerability identified as CVE-2022-23529, with a high-severity score of 7.6, was found in the JsonWebToken open-source project.
By exploiting this vulnerability, adversaries can receive remote code execution (RCE).
This vulnerability pertains to all who are using the JsonWebToken versions 8.5.1 and below on the NodeJS platform.
Usually, adversaries use JsonWebToken vulnerabilities to bypass authentication and authorization mechanisms, which gives them the option to take over the account, impersonate users, and elevate privileges.
However, this vulnerability can give adversaries the option to execute remote code on the browser.
Looking at the JsonWebToken repository, one of its functions is called verify.js. This is used to verify the validity of the JsonWebToken and returns the decoded payload part.
This function receives three parameters:
According to the JsonWebToken implementation for node.js documentation, the SecretOrPrivateKey parameter is a string (UTF-8 encoded), buffer, object, or KeyObject containing either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.
When using Verify.js, if no arguments are provided in the options.algorithms list, the SecretOrPrivateKey uses the method toStrings() that will return the string representation of an object, and the PEM values will be assigned instead.
That indicates that there will be no validation to determine whether SecretOrPublicKey is indeed a string or a buffer, so if the toString() method is controllable, an adversary can insert a malicious code to receive a remote code execution (RCE).
By creating a malicious object and using the child_process module with the exec() method, it will spawn a shell that will execute the command within that shell.
Once the request is sent back to the server, it will execute CMD command using child_process.exec() function on the exit event of the process. Then the process exits with a code of 0. This way, the payload will run before it gets to the indexOf() method.
Update the JsonWebToken version to 9.0.0.0, which addresses the vulnerability with a fix:
As Cynet is aware of emerging threats and vulnerabilities, we have confirmed and made sure Cynet’s 360 AutoXDR platform and infrastructure are not affected by the JWT RCE vulnerability.
Cynet’s research team has already deployed a new detection to detect attempts to exploit this vulnerability.
To ensure you are fully protected by Cynet 360 AutoXDR, please confirm that all mechanisms are set with detection and preventions enabled.
Cynet is continuing to monitor the threat landscape for new risks and vulnerabilities and will provide updates about any developments, dependencies, and measures to take to mitigate these threats.
As always, the CyOps team is available 24/7 for any question or concern.
Search results for: