{"schemaVersion":3,"id":"CVE-2022-31836","aliases":["GHSA-95f9-94vc-665h","GO-2022-0569"],"status":"published","duplicateOf":null,"title":null,"description":"The leafInfo.match() function in Beego v2.0.3 and below uses path.join() to deal with wildcardvalues which can lead to cross directory risk.","dates":{"published":"2022-07-05T00:00:00.000Z","modified":"2024-08-03T07:26:01.106Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.5,"severity":"high","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01663,"percentile":0.76359,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.04799999999999978,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01615},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01663,"percentile":0.76359}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01615,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01663,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01663,"percentile":0.76359}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_BEEGO_BEEGO","name":"Beego","source":"github","url":"https://github.com/beego/beego/issues/4484","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"beego","product":"beego","name":"beego","label":"beego","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 2.0.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 2.0.3","eol":null,"hubHref":"/vendor/beego/beego"},{"vendor":"github.com/astaxie","product":"beego","name":"github.com/astaxie/beego","label":"beego","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/astaxie/beego","purlType":"golang","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"github.com/beego","product":"beego","name":"github.com/beego/beego","label":"beego","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/beego/beego","purlType":"golang","versions":[{"text":"< 1.12.11","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.12.11","eol":null,"hubHref":null},{"vendor":"github.com/beego/beego","product":"v2","name":"github.com/beego/beego/v2","label":"v2","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/beego/beego/v2","purlType":"golang","versions":[{"text":"≥ 2.0.0, < 2.0.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 2.0.0, < 2.0.4","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/beego/beego/issues/4961","label":"github.com/beego/beego/issues/4961","hostname":"github.com","tags":["WEB","Exploit","Issue Tracking","Patch","Third Party Advisory"]},{"url":"https://github.com/advisories/GHSA-95f9-94vc-665h","label":"github.com/advisories/GHSA-95f9-94vc-665h","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31836","label":"nvd.nist.gov/vuln/detail/CVE-2022-31836","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/beego/beego/pull/5025","label":"github.com/beego/beego/pull/5025","hostname":"github.com","tags":["WEB","FIX"]},{"url":"https://github.com/beego/beego/pull/5025/commits/ea5ae58d40589d249cf577a053e490509de2bf57","label":"github.com/beego/beego/pull/5025/commits/ea5ae58d40589d249cf577a053e490509de2bf57","hostname":"github.com","tags":["WEB","FIX"]},{"url":"https://github.com/beego/beego","label":"github.com/beego/beego","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0569","label":"pkg.go.dev/vuln/GO-2022-0569","hostname":"pkg.go.dev","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-07-05T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T07:26:01.106Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T09:51:50.790Z","stale":false,"partial":false}}