CVE-2022-46178 Path Traversal In MeterSpere allows file upload to any path

High 7.4 Published Updated

Attackers can upload files to arbitrary paths due to lack of filename validation, potentially leading to code execution or data modification.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-46178?

CVE-2022-46178 is a high-severity path traversal vulnerability in metersphere, published on 29 Dec 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

MeterSphere is a one-stop open source continuous testing platform, covering test management, interface testing, UI testing and performance testing. Versions prior to 2.5.1 allow users to upload a file, but do not validate the file name, which may lead to upload file to any path. The vulnerability has been fixed in v2.5.1. There are no workarounds.

Weakness: CWE-22

Which versions are affected by CVE-2022-46178?

2 open source packages ship an affected version, including io.metersphere:metersphere. It affects 1 product.

PackageAffectedFixed in
io.metersphere:metersphere MavenAll versions2.5.1
io.metersphere:metersphere MavenAll versions2.5.1

Products include Metersphere Metersphere.

How do I fix CVE-2022-46178?

Upgrade io.metersphere:metersphere to 2.5.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-46178 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46178 exists.

Sources

Also known as GHSA-9p62-x3c5-hr5p.

Is CVE-2022-46178 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free