Vulnerability · Published Dec 9, 2020 · Assigned by snyk
CVE-2020-7787Improper Authentication
High 8.2
In plain English
A high-severity security flaw in react-adal. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.3% (higher than 70% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
This affects all versions of package react-adal. 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | react-adal | 0.5.1 | GHSA-7mpx-vg3c-cmr4 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | react-adal | 0 – before unspecified |
References
- https://snyk.io/vuln/SNYK-JS-REACTADAL-1018907 x_refsource_MISC
- https://github.com/salvoravida/react-adal/pull/115 x_refsource_MISC