Miggo Logo

CVE-2020-26938: oauth2-server through 3.1.1 vulnerable to Open Redirect

7.2

CVSS Score
3.1

Basic Information

EPSS Score
0.37868%
Published
8/30/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
oauth2-servernpm<= 3.1.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper URI validation in two key functions: 1) The authorization code grant type's redirect URI validation uses a flawed regex that doesn't properly check URI structure. 2) The is.uri validator implements an RFC-noncompliant pattern ([a-zA-Z][a-zA-Z0-9+.-]+:), missing critical validation of authority/path components. Together these allow injection of malicious redirect URIs. The code references and CVE analysis explicitly point to these functions/locations as the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In o*ut**-s*rv*r (*k* no**-o*ut**-s*rv*r) t*rou** *.*.*, t** v*lu* o* t** `r**ir**t_uri` p*r*m*t*r r***iv** *urin* t** *ut*oriz*tion *n* tok*n r*qu*st is ****k** ***inst *n in*orr**t URI p*tt*rn (`[*-z*-Z][*-z*-Z*-*+.-]+:`) ***or* m*kin* * r**ir**tio

Reasoning

T** vuln*r**ility st*ms *rom improp*r URI v*li**tion in two k*y *un*tions: *) T** *ut*oriz*tion *o** *r*nt typ*'s r**ir**t URI v*li**tion us*s * *l*w** r***x t**t *o*sn't prop*rly ****k URI stru*tur*. *) T** `is.uri` v*li**tor impl*m*nts *n R**-non*o