CVE-2022-21192: Directory Traversal vulnerability in serve-lite
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77215%
CWE
Published
1/26/2023
Updated
1/30/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| serve-lite | npm | <= 1.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the code shown in server.js lines 111-114 (as referenced in the PoC), where req.url is decoded and passed to path.join() without proper sanitization. The path.join() operation with user-controlled input enables directory traversal when combined with Node.js path resolution behavior. The proof of concept demonstrates this by accessing ../../package.json, confirming the lack of path containment checks. The primary vulnerable code path is the GET request handler that processes URLs and resolves file paths.