CVE-2022-1993: Path Traversal in Git HTTP endpoints in Gogs
8.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.5898%
CWE
Published
6/8/2022
Updated
1/27/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
gogs.io/gogs | go | < 0.12.9 | 0.12.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper path sanitization in Git HTTP request handling. The commit diff shows the HTTP
handler in http.go
previously used raw user input (m[1]) to build repository paths. The patch introduced pathutil.Clean()
and validation checks, confirming the vulnerability existed in the original path handling logic. The HTTP
function's direct use of unsanitized user input for file system operations matches the CWE-22 path traversal pattern.