Vulnerability record · CVE-2021-22911 · published 27 May 2021
CVE-2021-22911: Rocket.Chat improper input sanitization allows unauthenticated NoSQL injection
RRocket.Chat · Rocket.Chat
Rocket.Chat server versions 3.11, 3.12 and 3.13 fail to properly sanitize input, allowing unauthenticated NoSQL injection. The flaw can escalate to remote code execution, making it a serious risk for exposed chat servers.
Description
A improper input sanitization vulnerability exists in Rocket.Chat server 3.11, 3.12 & 3.13 that could lead to unauthenticated NoSQL injection, resulting potentially in RCE.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityCVSS 9.8 with unauthenticated network exploitation and public exploit code, plus very high EPSS, makes this an urgent patching priority.
What it is
Rocket.Chat server versions 3.11, 3.12 and 3.13 fail to properly sanitize input, allowing unauthenticated NoSQL injection. The flaw can escalate to remote code execution, making it a serious risk for exposed chat servers.
Impact
An unauthenticated attacker can inject NoSQL operators to manipulate queries and potentially achieve remote code execution on the server. This can lead to full compromise of the Rocket.Chat instance and its data.
Attack surface
The vulnerability is network-reachable with no authentication or user interaction required, per the CVSS vector AV:N/AC:L/PR:N/UI:N. It is exploited through crafted input to the Rocket.Chat server.
Exploitation
Public exploit code is referenced in Packetstorm, SonarSource and HackerOne advisories, and EPSS is 0.95242 (99.862 percentile), indicating very high likelihood of exploitation. It is not listed in CISA KEV.
What to do
- Upgrade Rocket.Chat to a patched version newer than 3.13 as soon as possible.
- If immediate upgrade is not possible, restrict network access to the Rocket.Chat server to trusted users only.
- Monitor vendor advisories and apply any hotfixes or configuration hardening guidance for NoSQL injection.
- Review and sanitize all user-supplied input handling in custom integrations or plugins.
- Enable authentication and rate limiting where feasible to reduce exposure.
Detection
- Inspect Rocket.Chat server logs for unusual NoSQL query patterns or errors containing operators like $where, $ne, or $gt.
- Monitor for unexpected outbound connections or process execution from the Rocket.Chat server host.
- Use network detection to identify exploit attempts against Rocket.Chat endpoints based on known public exploit signatures.
- Audit authentication and API access logs for anomalous unauthenticated requests to Rocket.Chat.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| http://packetstormsecurity.com/files/162997/Rocket.Chat-3.12.1-NoSQL-Injection-Code-Execution.html | ExploitThird Party AdvisoryVDB Entry |
| http://packetstormsecurity.com/files/163419/Rocket.Chat-3.12.1-NoSQL-Injection-Code-Execution.html | ExploitThird Party AdvisoryVDB Entry |
| https://blog.sonarsource.com/nosql-injections-in-rocket-chat | ExploitThird Party Advisory |
| https://hackerone.com/reports/1130721 | ExploitThird Party Advisory |
| http://packetstormsecurity.com/files/162997/Rocket.Chat-3.12.1-NoSQL-Injection-Code-Execution.html | ExploitThird Party AdvisoryVDB Entry |
| http://packetstormsecurity.com/files/163419/Rocket.Chat-3.12.1-NoSQL-Injection-Code-Execution.html | ExploitThird Party AdvisoryVDB Entry |
| https://blog.sonarsource.com/nosql-injections-in-rocket-chat | ExploitThird Party Advisory |
| https://hackerone.com/reports/1130721 | ExploitThird Party Advisory |
Track CVE-2021-22911 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-22911), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.