CVE-2022-28357 NATS nats-server allows directory traversal via unintended path to a management action
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.
| Package | Affected | Fixed in |
|---|---|---|
github.com/nats-io/nats-server Go | All versions | None |
github.com/nats-io/nats-server Go | From 2.2.0 | 2.7.4 |
github.com/nats-io/nats-server Go | From 2.2.0 | 2.7.4 |
github.com/nats-io/nats-server/v2 Go | From 2.2.0 | 2.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.
Other vulnerabilities in n/a
- CVE-2026-58253 NATS Server: Route API Auth Bypass
- CVE-2022-24450 Incorrect Authorization in NATS nats-server
- CVE-2026-33216 NATS has MQTT plaintext password disclosure
- CVE-2026-58207 NATS Server: Remote crash via integer overflow in Connz pagination
- CVE-2026-58210 NATS Server: MQTT partial CONNECT packets can exhaust pre-auth memory
Sources
Also known as GHSA-vpjc-4jcv-jc29, GO-2023-2066, UBUNTU-CVE-2022-28357.