CVE-2026-33247: NATS credentials are exposed in monitoring port via command-line argv
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server provides an optional monitoring port, which provides access to sensitive data. The nats-server can take certain configuration options on the command-line instead of requiring a configuration file.
Problem Description
If a nats-server is run with static credentials for all clients provided via argv (the command-line), then those credentials are visible to any user who can see the monitoring port, if that too is enabled.
The /debug/vars end-point contains an unredacted copy of argv.
Patches
Fixed in nats-server 2.12.6 & 2.11.15
Workarounds
The NATS Maintainers are bemused at the concept of someone deploying a real configuration using --pass to avoid a config file, but also enabling monitoring.
Configure credentials inside a configuration file instead of via argv.
Do not enable the monitoring port if using secrets in argv.
Best practice remains to not expose the monitoring port to the Internet, or to untrusted network sources.
Other sources
NATS-Server is a High-Performance server for NATS.io, a cloud and edge native messaging system. Prior to versions 2.11.15 and 2.12.6, if a nats-server is run with static credentials for all clients provided via argv (the command-line), then those credentials are visible to any user who can see the monitoring port, if that too is enabled. The /debug/vars end-point contains an unredacted copy of argv. Versions 2.11.15 and 2.12.6 contain a fix. As a workaround, configure credentials inside a configuration file instead of via argv, and do not enable the monitoring port if using secrets in argv. Best practice remains to not expose the monitoring port to the Internet, or to untrusted network sources.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.12.6 - Upgrade
Upgrade
go/github.com/nats-io/nats-server/v2to a version that resolves this vulnerability.Fixed in 2.11.15 - Upgrade
Upgrade
nats-serverto a version that resolves this vulnerability.Fixed in 2.12.6 - Upgrade
Upgrade
nats-serverto a version that resolves this vulnerability.Fixed in 2.11.15 - Configuration
Configure static client credentials inside a configuration file rather than providing them via command-line argv (e.g., avoid using --pass with command-line secrets).
nats-server credentials configuration method = configuration file instead of argv - Configuration
Do not enable the nats-server monitoring port if you are using secrets in argv, because the /debug/vars endpoint can expose an unredacted copy of argv.
nats-server monitoring port / monitoring enabled = disabled when using secrets in argv - Compensating control
As best practice, do not expose the nats-server monitoring port to the Internet or to untrusted network sources.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-33247?
CVE-2026-33247 has been rated with a medium severity due to its potential exposure of sensitive data.
How do I fix CVE-2026-33247?
To fix CVE-2026-33247, upgrade the nats-server to version 2.12.6 or 2.11.15, which include the necessary security patches.
What systems are affected by CVE-2026-33247?
CVE-2026-33247 affects nats-server versions between 2.12.0-RC.1 and 2.12.6, as well as versions prior to 2.11.15.
What is the risk of not addressing CVE-2026-33247?
Not addressing CVE-2026-33247 could allow unauthorized access to sensitive data, increasing the risk of data breaches.
Is there a workaround for CVE-2026-33247?
Currently, the recommended action for CVE-2026-33247 is to upgrade to the latest versions, as no effective workaround has been provided.