Every CVE Search/ Get API key

CVE-2022-31259

Access control bypass in beego

9.8 CriticalFix available

The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

22.2%Up 21.3 points since May 22, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
CVE-2022-31259
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Updated
2026-11-02
CVE List No score

The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
CVE-2022-31259
Updated
2026-11-02
EUVDEUVD-2022-5053 No score

The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
EUVD-2022-5053
Updated
2026-11-03
GitHub AdvisoriesGHSA-qx32-f6g6-fcfr 9.8

Access control bypass in beego

The route lookup process in beego prior to 1.12.9 and 2.x prior to 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
GHSA-qx32-f6g6-fcfr
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-284
Updated
2026-11-02
OSVGHSA-qx32-f6g6-fcfr 9.8

Access control bypass in beego

The route lookup process in beego prior to 1.12.9 and 2.x prior to 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
GHSA-qx32-f6g6-fcfr
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-284
Updated
2026-11-02
OSV No score

The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control. When a /p1/p2/:name route is configured, attackers can access it by appending .xml in various places (e.g., p1.xml instead of p1).

Record
CVE-2022-31259
Updated
2026-11-02
OSVGO-2022-0463 No score

Access control bypass due to broad route matching in github.com/beego/beego and beego/v2

Routes in the beego HTTP router can match unintended patterns. This overly-broad matching may permit an attacker to bypass access controls.

For example, the pattern "/a/b/:name" can match the URL "/a.xml/b/". This may bypass access control applied to the prefix "/a/".

Record
GO-2022-0463
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/beego/beego/v2
Go
before 2.0.3
2.0.3
github.com/beego/beego
Go
before 1.12.9
1.12.9
github.com/astaxie/beego
Go
All versions None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-31259 is a critical vulnerability (CVSS 9.8) in Beego, published May 21, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 22.2%, the 97th percentile. Fixed in github.com/beego/beego/v2 2.0.3.

References

Show 6 moreShow less
MoveEnter Open