(This document is canonically: https://advisories.nats.io/CVE/CVE-2022-26652.txt)
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
JetStream is the optional RAFT-based resilient persistent feature of NATS.
The JetStream streams can be backed up and restored via NATS. The backup format is a tar archive file. Inadequate checks on the filenames within the archive file permit a so-called "Zip Slip" attack in the stream restore.
NATS nats-server through 2022-03-09 (fixed in release 2.7.4) did not correctly sanitize elements of the archive file, thus a user of NATS could cause the NATS server to write arbitrary content to an attacker-controlled filename.
NATS Server:
NATS Streaming Server
Upgrade the NATS server to at least 2.7.4.
We fully support the util/nats-server-hardened.service configuration for running a NATS server and encourage this approach.
This issue was reported (on 2022-03-07) to the NATS Maintainers by
Yiming Xiang, TIANJI LAB of NSFOCUS.
Thank you / 谢谢你!
{
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2022-03-10T22:07:30Z",
"nvd_published_at": "2022-03-10T17:47:00Z",
"severity": "HIGH"
}