Miggo Logo

CVE-2020-7787: Improper Authentication in react-adal

8.2

CVSS Score
3.1

Basic Information

EPSS Score
0.49996%
Published
4/13/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
react-adalnpm< 0.5.10.5.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from how nonce and state values were stored with trailing || delimiters, creating empty string entries. The original validation functions (_matchNonce and _matchState) iterated through split values without checking for empty elements. This allowed attackers to submit empty nonce/session parameters that would match the stored empty strings. The commit diff shows these functions were modified to add truthiness checks (requestNonce[i] && ...), confirming these were the vulnerable validation points. The CVE description directly implicates the nonce and state validation logic as the flawed authentication mechanism.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T*is *****ts v*rsions o* r***t-***l < *.*.*. It is possi*l* *or * sp**i*lly *r**t** JWT tok*n *n* r*qu*st URL **n **us* t** non**, s*ssion *n* r**r*s* v*lu*s to ** in*orr**tly v*li**t**, **usin* t** *ppli**tion to tr**t *n *tt**k*r-**n*r*t** JWT tok*

Reasoning

T** vuln*r**ility st*ms *rom *ow non** *n* st*t* v*lu*s w*r* stor** wit* tr*ilin* || **limit*rs, *r**tin* *mpty strin* *ntri*s. T** ori*in*l v*li**tion *un*tions (_m*t**Non** *n* _m*t**St*t*) it*r*t** t*rou** split v*lu*s wit*out ****kin* *or *mpty *