CVE-2022-31836: Path Traversal in Beego
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.62084%
CWE
Published
7/6/2022
Updated
8/28/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:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/beego/beego | go | < 1.12.11 | 1.12.11 |
github.com/beego/beego/v2 | go | >= 2.0.0, < 2.0.4 | 2.0.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the Tree.Match function's handling of wildcard values in routing patterns. Multiple sources (CVE description, GitHub issue #4961, and commit ea5ae58) directly implicate this function. The fix involved adding path.Clean() to sanitize inputs, confirming the vulnerability existed in the path joining logic within Match. The affected file path is explicitly referenced in issue discussions and the commit diff.