CVE-2022-31836 is a critical-severity (CVSS 9.8) Path Traversal vulnerability in github.com/beego/beego. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for github.com/beego/beego — see the affected versions and patch details below.
Path Traversal in Beego
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/beego/beego🐹github.com/beego/beego/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
The leafInfo.match() function in Beego v2.0.3 and below uses path.join() to deal with wildcardvalues which can lead to cross directory risk.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/beego/beego | all versions | 1.12.11go get github.com/beego/beego@v1.12.11 |
| 🐹Go | github.com/beego/beego/v2 | ≥ 2.0.0&&< 2.0.4 | 2.0.4go get github.com/beego/beego/v2@v2.0.4 |
Affected Products
beegobeegoResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/beego/beego, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/beego/beego to 1.12.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-31836 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Frequently Asked Questions
Is CVE-2022-31836 in your dependencies?
Find it across Go, including transitive dependencies.