CVE-2022-31259: Access control bypass in github.com/beego/beego and beego/v2

github.com/astaxie/beego Updated 02 Oct 2025

Summary

01/07/2022
No i
Unrated
Not published

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/astaxie/beego.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback