Authenticated command execution via unfiltered MongoDB operators
Published Aug 9, 2021 · Updated Aug 3, 2024
NoSQL injection in Rocket.Chat server before 3.11.4, 3.12.0 through 3.12.3, and 3.13.0 through 3.13.1 allows remote authenticated users to execute arbitrary commands. The users.list endpoint passes its query into MongoDB after a field blocklist that fails to reject the top-level $where operator, allowing injected JavaScript to expose user secrets through error messages. Any authenticated account can leak an administrator's password hash and two-factor secret, reset that account, and use scripted integrations to run host commands.
Summary
What happened
NoSQL injection in Rocket.Chat server before 3.11.4, 3.12.0 through 3.12.3, and 3.13.0 through 3.13.1 allows remote authenticated users to execute arbitrary commands. The users.list endpoint passes its query into MongoDB after a field blocklist that fails to reject the top-level $where operator, allowing injected JavaScript to expose user secrets through error messages. Any authenticated account can leak an administrator's password hash and two-factor secret, reset that account, and use scripted integrations to run host commands.
The record
- CVE
- CVE-2021-22910
- Published
- Aug 9, 2021
- Updated
- Aug 3, 2024
- Vendor
- Rocket.Chat Technologies Corp.
- Product
- Rocket.Chat
- Classifications
- CWE-75, T1190
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Aug 9, 2021CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=Fixed versions: 3.13.2, 3.12.4, 3.11.4
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Rocket.Chat 3.12.1 - NoSQL Injection to RCE (Unauthenticated) (2)functional · unverified
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo