Unauthenticated RCE via pipe-prefixed subscription URL
Published Oct 20, 2021 · Updated Aug 4, 2024
OS command injection in Discourse before 2.7.9 stable or 2.8.0.beta7 beta allows remote attackers to execute code via SNS webhooks. The ConfirmSnsSubscription job passes a verified message's subscribe_url to Kernel.open, which treats a pipe-prefixed value as a command; the patch parses it as a URI and uses Net::HTTP instead. No Discourse account or user interaction is required, and self-hosted instances expose the webhook route even when AWS SNS is unused.
Summary
What happened
OS command injection in Discourse before 2.7.9 stable or 2.8.0.beta7 beta allows remote attackers to execute code via SNS webhooks. The ConfirmSnsSubscription job passes a verified message's subscribe_url to Kernel.open, which treats a pipe-prefixed value as a command; the patch parses it as a URI and uses Net::HTTP instead. No Discourse account or user interaction is required, and self-hosted instances expose the webhook route even when AWS SNS is unused.
The record
- CVE
- CVE-2021-41163
- Published
- Oct 20, 2021
- Updated
- Aug 4, 2024
- Vendor
- Discourse
- Product
- Discourse
- Classifications
- CWE-74, CWE-78, T1059
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 20, 2021CVE publishedPublication date reported by the CVE source.
- Aug 4, 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=beta < 2.8.0.beta7
- Affected versionversion=stable < 2.7.9
- Affected versionversion=tests-passed < 2.8.0.beta7
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
No public exploit references are available in this record.
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