CVE-2020-7787 json
Improper Authentication
published 2020-12-09 5 y ago modified 2026-06-17 4 mo ago also GHSA-7mpx-vg3c-cmr4 , EUVD-2021-0792
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 70%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Exploit prediction
1.28% chance of exploitation in the next 30 days, higher than 70% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/salvoravida/react-adal/pull/115 referenced PoC, tagged "exploit" by a source, unverified
- snyk.io https://snyk.io/vuln/SNYK-JS-REACTADAL-1018907 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N/E:P/RL:T/RC:R |
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | react-adal | <0.5.1 |
0.5.1 |
Affected products
- n/a react-adal
Classification
- Weakness
-
- CWE-287 Improper Authentication
References
-
github.com
/salvoravida/react-adal/pull/115
web, exploit, third-party-advisory
-
github.com
/salvoravida/react-adal/commit/74158dba1647b12fe96fa401e306a6287fe9e2a9
web
-
snyk.io
/vuln/SNYK-JS-REACTADAL-1018907
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-7787
advisory
Sources
- CVE List CVE-2020-7787
- GitHub Advisory GHSA-7mpx-vg3c-cmr4
- NVD CVE-2020-7787
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.