{"id":"CVE-2022-31259","aliases":["CVE-2022-31259","GHSA-qx32-f6g6-fcfr","GO-2022-0463"],"related":[],"kind":"vulnerability","state":"published","title":"Access control bypass in beego","summary":"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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).","source":"cvelist"},{"lang":"en","text":"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).","format":"markdown","source":"ghsa"},{"lang":"en","text":"Routes in the beego HTTP router can match unintended patterns. This overly-broad matching may permit an attacker to bypass access controls.\n\nFor example, the pattern \"/a/b/:name\" can match the URL \"/a.xml/b/\". This may bypass access control applied to the prefix \"/a/\".","format":"markdown","source":"go"},{"lang":"es","text":"El proceso de búsqueda de rutas en beego versiones hasta 1.12.4 y versiones2.x hasta 2.0.2, permite a atacantes omitir el control de acceso. Cuando es configurada una ruta /p1/p2/:name, los atacantes pueden acceder a ella al añadir .xml en varios lugares (por ejemplo, p1.xml en lugar de p1)","source":"nvd"}],"published":"2022-05-21T00:00:00.000Z","modified":"2026-07-08T06:27:50.220Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.3"}],"ecosystem":"Go","package":"github.com/beego/beego/v2","purl":"pkg:golang/github.com/beego/beego/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.12.9"}],"ecosystem":"Go","package":"github.com/beego/beego","purl":"pkg:golang/github.com/beego/beego","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/astaxie/beego","purl":"pkg:golang/github.com/astaxie/beego","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.12.9"}],"ecosystem":"Go","package":"github.com/beego/beego","purl":"pkg:golang/github.com/beego/beego","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.3"}],"ecosystem":"Go","package":"github.com/beego/beego/v2","purl":"pkg:golang/github.com/beego/beego/v2","source":"go"},{"ranges":[{"status":"affected","lastAffected":"1.12.4"},{"status":"affected","introduced":"2.0.0","lastAffected":"2.0.2"}],"vendor":"beego","product":"beego","cpe":"cpe:2.3:a:beego:beego:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/beego/beego/issues/4946","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://beego.vip","tags":["product","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/beego/beego/tree/v2.0.2","tags":["release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/advisories/GHSA-qx32-f6g6-fcfr","tags":["advisory","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31259","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/beego/beego/pull/4954","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/beego/beego/pull/4958","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/beego/beego/commit/228576173a236c81a2122923fcf8099ad294e009","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/beego/beego/commit/64cf44d725c8cc35d782327d333df9cbeb1bf2dd","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/beego/beego","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0463","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31259","url":"https://www.cve.org/CVERecord?id=CVE-2022-31259","licence":"CVE Terms of Use","modified":"2024-08-03T07:11:39.910Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qx32-f6g6-fcfr","url":"https://github.com/advisories/GHSA-qx32-f6g6-fcfr","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:50.220Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0463","url":"https://pkg.go.dev/vuln/GO-2022-0463","licence":"CC-BY-4.0","modified":"2024-06-03T20:51:31.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31259","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31259","licence":"Public domain","modified":"2026-06-17T04:45:14.687Z"}],"updatedAt":"2026-11-25T22:58:11.886Z","epss":{"score":0.22158,"percentile":0.97724,"date":"2026-12-01T12:00:22.000Z"}}