Miggo Logo

CVE-2021-22903: Possible Open Redirect Vulnerability in Action Pack

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.36554%
Published
5/5/2021
Updated
8/17/2023
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
actionpackrubygems>= 6.1.0.rc2, < 6.1.3.26.1.3.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper regex escaping in host validation logic. The workaround explicitly patches the sanitize_string method to add Regexp.escape, and the advisory explains that non-dot-prefixed hosts were converted to unsafe regex patterns. This function is directly responsible for processing allowed hosts into match patterns, making it the clear vulnerability source.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T**r* is * possi*l* Op*n R**ir**t Vuln*r**ility in **tion P**k. V*rsions *****t**: >= v*.*.*.r** Not *****t**: < v*.*.*.r** *ix** V*rsions: *.*.*.* Imp**t ------ T*is is simil*r to *V*-****-*****. Sp**i*lly *r**t** *ost *****rs in *om*in

Reasoning

T** vuln*r**ility st*ms *rom improp*r r***x *s**pin* in *ost v*li**tion lo*i*. T** work*roun* *xpli*itly p*t***s t** s*nitiz*_strin* m*t*o* to *** R***xp.*s**p*, *n* t** **visory *xpl*ins t**t non-*ot-pr**ix** *osts w*r* *onv*rt** to uns*** r***x p*t