CVE-2022-30427: Path traversal in ginadmin
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.69063%
CWE
Published
5/26/2022
Updated
1/27/2023
KEV Status
No
Technology
Go
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 |
|---|---|---|---|
| github.com/gphper/ginadmin | go | <= 0.1.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unsanitized use of user-controlled path parameters in two controller methods. The pre-patch code directly concatenated configs.RootPath with c.Query("path") using gstrings.JoinStr, without validating if the resolved path stays within the intended directory tree. The commit 726109f fixes this by introducing filesystem.FilterPath which performs path containment checks. The vulnerable functions are clearly identified in the GitHub issue (#8) and the diff shows the exact lines where unsafe path handling occurred.