Miggo Logo

CVE-2024-23340:
@hono/node-server cannot handle "double dots" in URL

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.55718%
Published
1/23/2024
Updated
1/23/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@hono/node-servernpm>= 1.3.0, < 1.4.11.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the url getter in src/request.ts which directly used the raw incoming URL without path normalization. The commit diff shows the fix added path resolution using Node.js's path.resolve() when detecting '..' sequences. This matches the CWE-22 (Path Traversal) description and the advisory's impact statement about improper path handling. The vulnerable code was explicitly shown in pre-patch versions of the file, making this a clear root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t Sin** v*.*.*, w* us* our own R*qu*st o*j**t. T*is is *r**t, *ut t** `url` ****vior is un*xp**t**. In t** st*n**r* *PI, i* t** URL *ont*ins `..`, **r* **ll** "*ou*l* *ots", t** URL strin* r*turn** *y R*qu*st will ** in t** r*solv** p*t*.

Reasoning

T** vuln*r**ility st*ms *rom t** url **tt*r in `sr*/r*qu*st.ts` w*i** *ir**tly us** t** r*w in*omin* URL wit*out p*t* norm*liz*tion. T** *ommit *i** s*ows t** *ix ***** p*t* r*solution usin* `No**.js`'s `p*t*.r*solv*()` w**n **t**tin* '..' s*qu*n**s.