CVE-2022-46959 Path Traversal in github.com/go-sonic/sonic

Medium 4.3 Published Updated

Attackers can perform directory traversal in the Sonic admin backup component to read arbitrary files.

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-46959?

CVE-2022-46959 is a medium-severity path traversal vulnerability in n/a, published on 23 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

An issue in the component /admin/backups/work-dir of Sonic v1.0.4 allows attackers to execute a directory traversal.

Weakness: CWE-22

Which versions are affected by CVE-2022-46959?

3 open source packages ship an affected version, including github.com/go-sonic/sonic. It affects 1 product.

PackageAffectedFixed in
github.com/go-sonic/sonic GoAll versions1.0.5
github.com/go-sonic/sonic GoAll versions1.0.5
github.com/go-sonic/sonic GoAll versions1.0.5

Products include Sonic Project Sonic.

How do I fix CVE-2022-46959?

Upgrade github.com/go-sonic/sonic to 1.0.5 or later.

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

Is CVE-2022-46959 being exploited?

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

Sources

Also known as GHSA-2x48-p6cq-5xcw, GO-2023-1509.

Is CVE-2022-46959 in your software?

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

Check your SBOMs for free