Miggo Logo

CVE-2017-16097: Directory Traversal in tiny-http

7.5

CVSS Score
3.0

Basic Information

EPSS Score
0.67352%
Published
9/1/2020
Updated
9/7/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:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
tiny-httpnpm>= 0.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper path resolution when handling HTTP requests. The advisory explicitly states that the package resolves relative paths without adequate safeguards. In Node.js servers, the request handler that maps URL paths to filesystem paths (typically using methods like path.join() or path.resolve()) is the primary suspect. While the exact implementation isn't visible, the pattern matches classic path traversal vulnerabilities where user input is directly concatenated with a base directory without validation. The high confidence comes from the vulnerability's clear root cause (CWE-22) and the explicit PoC demonstrating traversal via URL manipulation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*****t** v*rsions o* `tiny-*ttp` r*solv* r*l*tiv* *il* p*t*s, r*sultin* in * *ir**tory tr*v*rs*l vuln*r**ility. * m*li*ious **tor **n us* t*is vuln*r**ility to ****ss *il*s outsi** o* t** int*n*** *ir**tory root, w*i** m*y r*sult in t** *is*losur* o*

Reasoning

T** vuln*r**ility st*ms *rom improp*r p*t* r*solution w**n **n*lin* *TTP r*qu*sts. T** **visory *xpli*itly st*t*s t**t t** p**k*** r*solv*s r*l*tiv* p*t*s wit*out ***qu*t* s****u*r*s. In `No**.js` s*rv*rs, t** r*qu*st **n*l*r t**t m*ps URL p*t*s to *