CVE-2022-24450

8.8 HIGH

📋 TL;DR

CVE-2022-24450 is an access control vulnerability in NATS nats-server that allows any authenticated user to escalate privileges to the System account level by abusing the dynamically provisioned sandbox accounts feature. This affects all NATS deployments using versions before 2.7.2 with authenticated users. The vulnerability enables complete system compromise through privilege escalation.

💻 Affected Systems

Products:
  • NATS nats-server
Versions: All versions before 2.7.2
Operating Systems: All platforms running NATS nats-server
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when using authentication with dynamically provisioned sandbox accounts feature.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the NATS messaging system allowing attackers to read all messages, inject malicious messages, disrupt communications, and potentially pivot to connected systems.

🟠

Likely Case

Unauthorized access to sensitive messages and data flowing through the NATS system, potentially leading to data breaches and service disruption.

🟢

If Mitigated

Limited impact if proper network segmentation and authentication controls prevent unauthorized access attempts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but is straightforward once authentication is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.7.2 and later

Vendor Advisory: https://advisories.nats.io/CVE/CVE-2022-24450.txt

Restart Required: Yes

Instructions:

1. Download NATS nats-server version 2.7.2 or later from GitHub releases. 2. Stop the current nats-server service. 3. Replace the binary with the patched version. 4. Restart the nats-server service. 5. Verify the version is 2.7.2 or higher.

🔧 Temporary Workarounds

Disable Dynamic Sandbox Accounts

all

Temporarily disable the dynamically provisioned sandbox accounts feature until patching can be completed.

Modify nats-server configuration to remove or disable sandbox account provisioning

Restrict Authentication

all

Implement strict authentication controls and limit user access to only necessary functions.

Review and tighten authentication configuration in nats-server config files

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate NATS servers from sensitive systems
  • Enhance monitoring and alerting for privilege escalation attempts and unusual account activity

🔍 How to Verify

Check if Vulnerable:

Check if nats-server version is below 2.7.2 and if authentication with sandbox accounts is enabled.

Check Version:

nats-server --version

Verify Fix Applied:

Verify nats-server version is 2.7.2 or higher and test that authenticated users cannot escalate to System account privileges.

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized privilege escalation attempts
  • Unexpected System account usage
  • Multiple authentication attempts from single user

Network Indicators:

  • Unusual message patterns or traffic spikes
  • Authentication requests from unexpected sources

SIEM Query:

source="nats-server" AND (event="privilege_escalation" OR user="System" OR auth_failure)

🔗 References

📤 Share & Export