---
id: CVE-2022-31836
aliases:
  - GHSA-95f9-94vc-665h
  - GO-2022-0569
title: Path Traversal in Beego
summary: Path Traversal in Beego
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: beego
product: github.com/beego/beego
ecosystem: go
affected:
  - github.com/beego/beego < 1.12.11
  - 'github.com/beego/beego/v2 >= 2.0.0, < 2.0.4'
patched:
  - github.com/beego/beego 1.12.11
  - github.com/beego/beego/v2 2.0.4
published: '2022-07-06'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-95f9-94vc-665h'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2022-31836'
  - url: 'https://github.com/beego/beego/issues/4961'
  - url: 'https://github.com/beego/beego/pull/5025'
  - url: >-
      https://github.com/beego/beego/pull/5025/commits/ea5ae58d40589d249cf577a053e490509de2bf57
  - url: 'https://github.com/advisories/GHSA-95f9-94vc-665h'
  - url: 'https://github.com/beego/beego'
  - url: 'https://pkg.go.dev/vuln/GO-2022-0569'
tags:
  - osv
  - go
epss: 0.01663
epssPercentile: 0.757
ingestedAt: '2026-07-09T18:56:36.261Z'
---

## Overview

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.

## Affected packages

- `github.com/beego/beego < 1.12.11`
- `github.com/beego/beego/v2 >= 2.0.0, < 2.0.4`

## Remediation

Upgrade to a patched release:

- `github.com/beego/beego 1.12.11`
- `github.com/beego/beego/v2 2.0.4`
