CVE-2022-31259: Access control bypass in github.com/beego/beego and beego/v2
Summary
CVE-2022-31259: Access control bypass due to broad route matching in github.com/beego/beego and beego/v2. Affected versions are not published. No fix is published. How to fix ↓
Also tracked for
The same CVE-2022-31259 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package github.com/beego/beego is a HTTP router for the Go programming language. It provides functionality for routing HTTP requests to the appropriate handlers. The beego/v2 package is an updated version of beego with additional features and improvements. Both packages are vulnerable to an access control bypass issue.
Vulnerability Detail
Routes in the beego HTTP router can match unintended patterns, which may allow an attacker to bypass access controls. For example, a pattern like "/a/b/:name" can match the URL "/a.xml/b/", potentially bypassing access control applied to the prefix "/a/". This vulnerability can lead to unauthorized access to sensitive resources or actions.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the fix by updating the affected packages to the fixed versions.
Conclusion
The access control bypass vulnerability in github.com/beego/beego and beego/v2 can lead to unauthorized access to sensitive resources or actions. It is recommended to update the affected packages to the fixed versions to mitigate this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for github.com/astaxie/beego →
FAQ
This vulnerability can allow an attacker to bypass access controls and gain unauthorized access to sensitive resources or actions in applications using the affected packages.
Yes, all versions prior to the fixed versions are affected by this vulnerability.
There is no known exploit for this vulnerability at the moment.
Modifying the affected routes may help mitigate the vulnerability, but it is recommended to apply the fix by updating the affected packages to the fixed versions.
You can find more information about this vulnerability in the provided sources: https://vuln.go.dev/ID/GO-2022-0463.json and https://vuln.go.dev/ID/GO-2022-0463.json.
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/astaxie/beego.