CVE-2022-31836

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

published July 5, 2022

CVSS
—
EPSS
2%
Percentile
76.5
In the wild
Unconfirmed
What it is

⚠️ Watch out for those wildcards! In Beego v2.0.3 and below, the leafInfo.match() function uses path.join() in a way that could lead to cross-directory risks. 🚨 Think of it like a delivery service that accidentally mixes up addresses. Instead of delivering packages to the intended recipients, it might end up dropping them off at the wrong locations altogether! An attacker might exploit this to confuse the system, allowing unauthorized access to files or directories that should be off-limits. It could lead to sensitive data being exposed, which is definitely something to avoid!

Put simply

Think of it like a delivery service that accidentally mixes up addresses. Instead of delivering packages to the intended recipients, it might end up dropping them off at the wrong locations altogether! This vulnerability arises when the leafInfo.match() function tries to handle wildcard values using path.join(), which inadequately verifies directory paths, creating opportunities for cross-directory traversal.

What to do

An attacker might exploit this to confuse the system, allowing unauthorized access to files or directories that should be off-limits. It could lead to sensitive data being exposed, which is definitely something to avoid! To protect your application, update Beego to version 2.0.4 or later to patch this issue. Also, consider reviewing your path handling logic to ensure proper validation is in place. 🛡️ You've got this! Follow these steps and keep your application secure. 🦸‍♂️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01663 · 76.5th percentile
Published
2022-07-05T00:00Z
EPSS history
Timeline
  • 05 JUL 00:00Z
    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
    cvelistv5