Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTdtcHgtdmczYy1jbXI0

Improper Authentication in react-adal

This affects versions of react-adal < 0.5.1. It is possible for a specially crafted JWT token and request URL can cause the nonce, session and refresh values to be incorrectly validated, causing the application to treat an attacker-generated JWT token as authentic. The logical defect is caused by how the nonce, session and refresh values are stored in the browser local storage or session storage. Each key is automatically appended by ||. When the received nonce and session keys are generated, the list of values is stored in the browser storage, separated by ||, with || always appended to the end of the list. Since || will always be the last 2 characters of the stored values, an empty string ("") will always be in the list of the valid values. Therefore, if an empty session parameter is provided in the callback URL, and a specially-crafted JWT token contains an nonce value of "" (empty string), then adal.js will consider the JWT token as authentic.

Permalink: https://github.com/advisories/GHSA-7mpx-vg3c-cmr4
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTdtcHgtdmczYy1jbXI0
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 3 years ago
Updated: about 1 year ago


CVSS Score: 8.2
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Identifiers: GHSA-7mpx-vg3c-cmr4, CVE-2020-7787
References: Repository: https://github.com/salvoravida/react-adal
Blast Radius: 18.0

Affected Packages

npm:react-adal
Dependent packages: 32
Dependent repositories: 155
Downloads: 19,690 last month
Affected Version Ranges: < 0.5.1
Fixed in: 0.5.1
All affected versions: 0.1.15, 0.2.15, 0.3.15, 0.4.17, 0.4.18, 0.4.19, 0.4.20, 0.4.21, 0.4.22, 0.4.23, 0.4.24, 0.5.0
All unaffected versions: 0.5.1, 0.5.2