fastify bearer-auth up to 6.0.2/7.0.1/8.0.0 crypto.timingSafeEqual timing discrepancy
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.3 | $0-$5k | 0.00 |
Summary
A vulnerability was found in fastify bearer-auth up to 6.0.2/7.0.1/8.0.0 and classified as critical. Affected is the function crypto.timingSafeEqual. The manipulation results in timing discrepancy.
This vulnerability was named CVE-2022-31142. The attack may be performed from remote. There is no available exploit.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in fastify bearer-auth up to 6.0.2/7.0.1/8.0.0. It has been classified as critical. Affected is the function crypto.timingSafeEqual. The manipulation with an unknown input leads to a timing discrepancy vulnerability. CWE is classifying the issue as CWE-208. Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. This is going to have an impact on confidentiality. CVE summarizes:
@fastify/bearer-auth is a Fastify plugin to require bearer Authorization headers. @fastify/bearer-auth prior to versions 7.0.2 and 8.0.1 does not securely use crypto.timingSafeEqual. A malicious attacker could estimate the length of one valid bearer token. According to the corresponding RFC 6750, the bearer token has only base64 valid characters, reducing the range of characters for a brute force attack. Version 7.0.2 and 8.0.1 of @fastify/bearer-auth contain a patch. There are currently no known workarounds. The package fastify-bearer-auth, which covers versions 6.0.3 and prior, is also vulnerable starting at version 5.0.1. Users of fastify-bearer-auth should upgrade to a patched version of @fastify/bearer-auth.
The weakness was presented 07/15/2022 as GHSA-376v-xgjx-7mfr. The advisory is shared for download at github.com. This vulnerability is traded as CVE-2022-31142 since 05/18/2022. There are known technical details, but no exploit is available. The MITRE ATT&CK project declares the attack technique as T1592.
Upgrading to version 6.0.3, 7.0.2 or 8.0.1 eliminates this vulnerability. Applying the patch 0c468a616d7e56126dc468150f6a5a92e530b8e4 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Product
Vendor
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.4VulDB Meta Temp Score: 6.3
VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔍
VulDB Reliability: 🔍
CNA Base Score: 7.5
CNA Vector (GitHub, Inc.): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Timing discrepancyCWE: CWE-208 / CWE-203 / CWE-200
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: bearer-auth 6.0.3/7.0.2/8.0.1
Patch: 0c468a616d7e56126dc468150f6a5a92e530b8e4
Timeline
05/18/2022 🔍07/15/2022 🔍
07/15/2022 🔍
07/15/2022 🔍
Sources
Advisory: GHSA-376v-xgjx-7mfrStatus: Confirmed
CVE: CVE-2022-31142 (🔍)
GCVE (CVE): GCVE-0-2022-31142
GCVE (VulDB): GCVE-100-203928
Entry
Created: 07/15/2022 07:37Changes: 07/15/2022 07:37 (53)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.