Miggo Logo

CVE-2024-0241: encoded_id-rails potential DOS vulnerability due to URIs with extremely long encoded IDs

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.58483%
Published
10/24/2023
Updated
1/8/2024
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
encoded_id-railsrubygems< 1.0.0.beta21.0.0.beta2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from hashids-based decoding logic in the encoded_id dependency. While the advisory doesn't explicitly name functions, the patch introduces length limits in decoding, and the CWE-400 classification indicates uncontrolled resource consumption. The core vulnerability must exist in the ID decoding path, which in hashids-based implementations typically involves a decode/decrypt-style function processing untrusted input without size validation. The dependency bump to encoded_id 1.0.0.rc3 (which presumably adds validation) confirms the vulnerable code resides in the decoding logic of the encoded_id library.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** l*n*t* o* URIs *n* t** v*rious p*rts (** p*t* s**m*nts, qu*ry p*r*m*t*rs) is usu*lly limit** *y t** w**s*rv*r pro**ssin* t** in*omin* r*qu*st. In t** **s* o* Pum* t** ****ults *r* : - p*t* s**m*nt l*n*t*: **** - M*x URI l*n*t*: ****

Reasoning

T** vuln*r**ility st*ms *rom **s*i*s-**s** ***o*in* lo*i* in t** *n*o***_i* **p*n**n*y. W*il* t** **visory *o*sn't *xpli*itly n*m* *un*tions, t** p*t** intro*u**s l*n*t* limits in ***o*in*, *n* t** *W*-*** *l*ssi*i**tion in*i**t*s un*ontroll** r*sour