CVE-2022-28357 NATS nats-server allows directory traversal via unintended path to a management action

Critical 9.8 Published Updated

An attacker with a management account can perform directory traversal to read or modify files on the NATS server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-28357?

CVE-2022-28357 is a critical path traversal vulnerability in n/a, published on 19 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

NATS nats-server 2.2.0 through 2.7.4 allows directory traversal because of an unintended path to a management action from a management account.

Weakness: CWE-22

Which versions are affected by CVE-2022-28357?

4 open source packages ship an affected version, including github.com/nats-io/nats-server and github.com/nats-io/nats-server/v2. It affects 1 product.

PackageAffectedFixed in
github.com/nats-io/nats-server GoAll versionsNone
github.com/nats-io/nats-server GoFrom 2.2.02.7.4
github.com/nats-io/nats-server GoFrom 2.2.02.7.4
github.com/nats-io/nats-server/v2 GoFrom 2.2.02.7.4

Products include Linuxfoundation Nats-Server.

How do I fix CVE-2022-28357?

Upgrade github.com/nats-io/nats-server to 2.7.4 or later.

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

Is CVE-2022-28357 being exploited?

There is no known exploitation of CVE-2022-28357 in the wild and no public exploit code.

Sources

Also known as GHSA-vpjc-4jcv-jc29, GO-2023-2066, UBUNTU-CVE-2022-28357.

Is CVE-2022-28357 in your software?

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

Check your SBOMs for free