GHSA-7mpx-vg3c-cmr4

Suggest an improvement
Source
https://github.com/advisories/GHSA-7mpx-vg3c-cmr4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-7mpx-vg3c-cmr4/GHSA-7mpx-vg3c-cmr4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7mpx-vg3c-cmr4
Aliases
Published
2021-04-13T15:22:37Z
Modified
2026-03-13T22:11:11.416389Z
Severity
  • 8.2 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N CVSS Calculator
Summary
Improper Authentication in react-adal
Details

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.

Database specific
{
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-287"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-04-09T19:38:58Z",
    "nvd_published_at": "2020-12-09T17:15:00Z"
}
References

Affected packages

npm / react-adal

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.5.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-7mpx-vg3c-cmr4/GHSA-7mpx-vg3c-cmr4.json"