Miggo Logo

CVE-2016-10525:
Authentication Bypass in hapi-auth-jwt2

9.8

CVSS Score
3.0

Basic Information

EPSS Score
0.6371%
Published
2/18/2019
Updated
1/9/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
hapi-auth-jwt2npm= 5.1.15.1.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from how the 'try' authentication mode was handled. The code path for missing tokens in non-'required' modes (like 'try') returned empty credentials while still marking the request as authenticated. This was fixed in 5.1.2 by removing the early return that set empty credentials, ensuring proper authentication checks. The GitHub issue #111 and PR #112 demonstrate this logic flaw in the authentication handler function().

Vulnerable functions

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

WAF Protection Rules

WAF Rule

V*rsions o* `**pi-*ut*-jwt*` prior to v*rsion *.*.* *r* *****t** *y * *ompl*t* *ut**nti**tion *yp*ss vuln*r**ility w**n in t** `try` *ut**nti**tion mo**. ## R**omm*n**tion Up**t* to v*rsion *.*.* or l*t*r.

Reasoning

T** vuln*r**ility st*mm** *rom *ow t** 'try' *ut**nti**tion mo** w*s **n*l**. T** *o** p*t* *or missin* tok*ns in non-'r*quir**' mo**s (lik* 'try') r*turn** *mpty *r***nti*ls w*il* still m*rkin* t** r*qu*st *s *ut**nti**t**. T*is w*s *ix** in *.*.* *