CVE-2021-32918

7.5 HIGH

📋 TL;DR

This vulnerability in Prosody XMPP servers allows remote attackers to cause denial-of-service via memory exhaustion without authentication. It affects Prosody servers running under Lua 5.2 or Lua 5.3 with default configurations. The attack can crash the server by exhausting available memory.

💻 Affected Systems

Products:
  • Prosody XMPP Server
Versions: All versions before 0.11.9
Operating Systems: All operating systems running affected Prosody versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when running under Lua 5.2 or Lua 5.3; Lua 5.1 and LuaJIT are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage with Prosody server crashing due to memory exhaustion, potentially affecting all connected XMPP clients and services.

🟠

Likely Case

Service disruption and server crashes requiring manual restart, with potential data loss for in-memory sessions.

🟢

If Mitigated

Minimal impact if patched or workarounds applied; otherwise normal operation unaffected.

🌐 Internet-Facing: HIGH - Remote unauthenticated attacks make internet-facing servers particularly vulnerable.
🏢 Internal Only: MEDIUM - Internal servers are still vulnerable but attack surface is reduced.

🎯 Exploit Status

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

The vulnerability is in default settings and requires no authentication, making exploitation straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.11.9

Vendor Advisory: https://blog.prosody.im/prosody-0.11.9-released/

Restart Required: Yes

Instructions:

1. Backup configuration and data. 2. Stop Prosody service. 3. Update to Prosody 0.11.9 or later via package manager or source. 4. Restart Prosody service. 5. Verify service is running correctly.

🔧 Temporary Workarounds

Memory limit configuration

all

Configure memory limits in Prosody configuration to limit impact

Edit prosody.cfg.lua and add: memory_limit = "512MB"

Network access restrictions

linux

Restrict access to Prosody ports to trusted networks only

Configure firewall rules to limit access to ports 5222, 5269, 5280, 5281

🧯 If You Can't Patch

  • Implement strict network segmentation and firewall rules to limit access to Prosody services
  • Monitor memory usage closely and implement automated restart scripts for when memory thresholds are exceeded

🔍 How to Verify

Check if Vulnerable:

Check Prosody version and Lua version: prosodyctl about | grep -E 'version|Lua'

Check Version:

prosodyctl about | grep 'version'

Verify Fix Applied:

Verify version is 0.11.9 or later: prosodyctl about | grep 'version'

📡 Detection & Monitoring

Log Indicators:

  • High memory usage warnings
  • Process crashes
  • Out of memory errors in system logs

Network Indicators:

  • Unusual high-volume connections to XMPP ports
  • Connection patterns suggesting DoS attempts

SIEM Query:

source="prosody.log" AND ("out of memory" OR "memory limit" OR "killed")

🔗 References

📤 Share & Export