LowGO-2022-0463CVE-2022-31259GHSA-qx32-f6g6-fcfr

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

Published 1 Jul 2022 · Updated 3 Jun 2024

Is your project on an affected github.com/astaxie/beego?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
All versions
Fixed in
No fix released
Affected
<1.12.9
Fixed in
1.12.9
Update to the fixed version for your release line, for example:go get github.com/beego/beego@v1.12.9
Affected
<2.0.3
Fixed in
2.0.3
Update to the fixed version for your release line, for example:go get github.com/beego/beego/v2@v2.0.3

Details

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/".

Is GO-2022-0463 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/astaxie/beego, and gives you the command that fixes it.

More advisories for github.com/astaxie/beego

  • LowCVE-2022-31836Path traversal in github.com/beego/beego and beego/v2 · 23 Aug 2022
  • LowCVE-2021-30080Access control bypass via incorrect route lookup in github.com/beego/beego and beego/v2 · 22 Aug 2022
  • MediumCVE-2019-16354Incorrect Default Permissions in Beego · 24 May 2022
  • MediumCVE-2019-16354Beego has a file creation race condition · 2 Aug 2021
  • LowCVE-2019-16354Incorrect permissions for critical resource in github.com/astaxie/beego · 14 Apr 2021
github.com/astaxie/beego security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.