Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as non-staff group member
-
DeliveryIdentify shared Data Explorer query with parameters
-
ExploitCraft parameter value embedding recursive param reference or comment-based declaration
-
ExecutionSubmit query execution request via HTTP
-
PersistInjected SQL executes in read-only transaction
-
ImpactExfiltrate sensitive table data from query results
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) an active Discourse account with membership in a group that has been explicitly granted access to at least one shared Data Explorer query - this is a non-default, administrator-configured state; (2) the discourse-data-explorer plugin must be installed and enabled on the instance; and (3) the target query must accept at least one user-supplied parameter, as queries without parameters have no interpolation surface. Exploitation is limited by the read-only transaction boundary, which unconditionally prevents INSERT, UPDATE, DELETE, and DDL operations regardless of the injected SQL. It is further limited by the PR:L requirement - anonymous visitors and users who have not been granted query access cannot exploit this flaw. The attack does not require staff or admin privileges, meaning any regular user in a sharing group is a potential attacker. |
| Impact | The CVSS 7.1 score (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N) accurately captures the primary risk profile. The network attack vector and low complexity reflect that exploitation requires only a valid HTTP request with crafted parameter values. The PR:L requirement is a meaningful limiting factor: the attacker must hold an account that has been granted access to a shared Data Explorer query, which is not the default for all users. The C:H impact is well-supported - read access to all PostgreSQL tables means credentials, private messages, user PII, and API tokens are exposed. The I:L in the vendor-assigned vector is worth scrutiny: the description explicitly states queries run in a read-only transaction, making direct data modification impossible. The I:L may account for indirect integrity risk (e.g., exfiltrated admin tokens enabling authenticated writes), but this should be understood as secondary rather than direct. No KEV listing and no public POC have been identified at time of analysis, which lowers the urgency relative to the raw CVSS score. However, exploitation complexity is genuinely low for anyone who already has query access, and the confidentiality impact is severe enough to treat this as high priority on affected instances. |
| Exploit ScenarioDerived | A non-staff member of a Discourse group that has been granted access to a shared Data Explorer query crafts a parameter value such that recursive interpolation introduces an additional parameter name, or encodes a SQL comment containing a new parameter declaration - effectively breaking out of the intended query template. The injected SQL executes within the existing read-only transaction, and the attacker extracts rows from the user_emails or api_keys table via the query result set. No public proof-of-concept code has been identified, but the technique is a straightforward variant of classic second-order SQL injection requiring only authenticated HTTP access. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 10, 2026
SQL injection in Discourse's Data Explorer plugin exposes the entire database to unauthorized reads by any user who can execute a shared parameterized query, including non-staff group members. The flaw stems from recursive parameter interpolation: a crafted parameter value could introduce additional parameters, and SQL comment syntax could be used to inject arbitrary statements. Queries execute in a read-only PostgreSQL transaction, so writes are blocked, but every database table - including private messages, user emails, hashed credentials, and API keys - is readable. No public exploit code has been identified at time of analysis, and no CISA KEV listing exists.
RemediationAI
Upgrade Discourse to one of the fixed releases: 2026.1.7, 2026.6.2, 2026.7.1, or 2026.8.0-latest.1, depending on the branch in use. The upstream fix commits are available at https://github.com/discourse/discourse/commit/2bdab888cef561348470dee204a4879d83fbb5c3, https://github.com/discourse/discourse/commit/3dc7f0da7aa18548281152e285244efb1cc8ad0d, https://github.com/discourse/discourse/commit/674ba6fc64184fd7d8e21183c5d8cb22367faa6e, and https://github.com/discourse/discourse/commit/ce9ccf24ec3538172dc8f8199728e08f63e57693. As a compensating control prior to patching, administrators can revoke non-staff group access to all shared Data Explorer queries - this eliminates the untrusted-user attack surface entirely, though it also disables the shared-query feature for those groups. Disabling the discourse-data-explorer plugin entirely is the most complete workaround if query functionality is not business-critical, with the trade-off of losing all Data Explorer reporting capabilities. Because the read-only transaction boundary prevents direct data modification, there is no equivalent network-layer control that blocks the specific injection vectors.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Discourse's discourse-data-explorer plugin allows staff and shared-group members to run parameterized SQL queries against the application's PostgreSQL database. The vulnerable code in plugins/discourse-data-explorer/lib/discourse_data_explorer/data_explorer.rb previously used MiniSql::InlineParamEncoder.encode() for bulk parameter substitution with no comment stripping, enabling two distinct injection paths. First, recursive interpolation: because substituted parameter values were re-scanned for additional parameter markers (e.g., :param), an attacker could supply a value like ':other_param' to redirect resolution. Second, comment-based injection: PostgreSQL SQL comments (-- and /* */) in the stored query could contain parameter declarations, and since comments were not stripped before interpolation, a crafted comment could activate injected SQL constructs. The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). The CPE cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:* covers all Discourse releases in the affected range. The fix introduced a single-pass strip_comments() function using StringScanner and a new interpolate_params() method that applies gsub exactly once - preventing re-scan of substituted values - and removes SQL comments before interpolation occurs.
Know when Discourse gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Read-only transaction enforced at DB level eliminates integrity impact; all other metrics match vendor vector - PR:L reflects mandatory group membership requirement.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Discourse is an open-source discussion platform. From 2026.1.0-latest until 2026.1.7, 2026.6.2, 2026.7.1, and 2026.8.0-latest.1, anyone able to run a parameterized Data Explorer query, including non-staff members of a group a query is shared with, could craft parameter values that escaped the intended query and executed arbitrary SQL through plugins/discourse-data-explorer/lib/discourse_data_explorer/data_explorer.rb and plugins/discourse-data-explorer/lib/discourse_data_explorer/workflows/sql_action/v1.rb. Recursive parameter interpolation allowed one parameter value to introduce another parameter, and parameter declarations in SQL comments could be used to inject a statement. Queries run in a read-only transaction, so data could not be modified, but any table could be read. This issue is fixed in versions 2026.1.7, 2026.6.2, 2026.7.1, and 2026.8.0-latest.1.
Executive ViewAI
A SQL injection vulnerability in Discourse's Data Explorer plugin enables any user with query execution permissions to read the entire database, including private messages, user credentials, and API keys. This confidentiality breach creates material risk to customer data security and regulatory compliance, requiring immediate disablement of the plugin pending a vendor patch.
No vendor-released patch identified at time of analysis. Interim mitigations: disable Data Explorer plugin completely until patched; restrict query creation and execution to authenticated senior administrative staff only; implement network-level access controls on the Discourse database; enable comprehensive audit logging of all query execution events; monitor for anomalous bulk-read patterns on sensitive tables; rotate all exposed API keys and enforce password resets for accounts with prior database access.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Discourse versions prior to 3.5.0.beta6 contain a reflected cross-site scripting (XSS) vulnerability in social login fun
discourse-bbcode is the official BBCode plugin for Discourse. Rated critical severity (CVSS 9.8), this vulnerability is
Unauthorized information disclosure in Discourse discussion platform versions prior to 2026.3.0-latest.1, 2026.2.1, and
Discourse is an open source platform for community discussion. Rated high severity (CVSS 8.2), this vulnerability is rem
Discourse versions prior to 2025.12.2, 2026.1.1, and 2026.2.0 contain an insecure direct object reference (IDOR) in the
In Discourse 2.7.0 through beta1, a rate-limit bypass leads to a bypass of the 2FA requirement for certain forms. Rated
Unauthenticated attackers can submit forged webhook payloads to multiple email provider integrations in Discourse versio
Discourse is an open-source discussion platform. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploi
Discourse is an open source platform for community discussion. Rated medium severity (CVSS 5.9), this vulnerability is r
Discourse versions prior to 3.4.4 (stable), 3.5.0.beta5 (beta), and 3.5.0.beta6-dev (tests-passed) contain a critical vu
Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is
Discourse Patreon enables syncronization between Discourse Groups and Patreon rewards. Rated critical severity (CVSS 9.8
EUVD-2026-55671
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB