Skip to main content

Discourse CVE-2026-72731

| EUVDEUVD-2026-55671 HIGH
SQL Injection (CWE-89)
2026-08-10 GitHub_M
7.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as non-staff group member
  2. Delivery
    Identify shared Data Explorer query with parameters
  3. Exploit
    Craft parameter value embedding recursive param reference or comment-based declaration
  4. Execution
    Submit query execution request via HTTP
  5. Persist
    Injected SQL executes in read-only transaction
  6. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

discourse 2026.8.0-latest, < 2026.8.0-latest.1
discourse 2026.6.0-latest, < 2026.6.2
discourse 2026.7.0-latest, < 2026.7.1
discourse < 2026.1.7

Affected Packages

euvd discourse fix: 2026.1.7
euvd discourse_2026_6_0_latest fix: 2026.6.2
euvd discourse_2026_7_0_latest fix: 2026.7.1
euvd discourse_2026_8_0_latest fix: 2026.8.0-latest.1

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

Vendor (GitHub_M) PRIMARY 7.1 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
vuln.today AI 6.5 MEDIUM

Read-only transaction enforced at DB level eliminates integrity impact; all other metrics match vendor vector - PR:L reflects mandatory group membership requirement.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Aug 10, 2026 - 17:03 EUVD
CVE Published
Aug 10, 2026 - 16:25 cve.org
HIGH 7.1

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Medium
popular open-source forum platform, widely used by tech communities
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-48954 HIGH POC
8.1 Jun 25

Discourse versions prior to 3.5.0.beta6 contain a reflected cross-site scripting (XSS) vulnerability in social login fun

CVE-2022-46162 CRITICAL POC
9.8 Nov 30

discourse-bbcode is the official BBCode plugin for Discourse. Rated critical severity (CVSS 9.8), this vulnerability is

CVE-2026-27934 HIGH POC
8.7 Mar 19

Unauthorized information disclosure in Discourse discussion platform versions prior to 2026.3.0-latest.1, 2026.2.1, and

CVE-2024-47773 HIGH POC
8.2 Oct 08

Discourse is an open source platform for community discussion. Rated high severity (CVSS 8.2), this vulnerability is rem

CVE-2026-26265 HIGH POC
7.5 Feb 26

Discourse versions prior to 2025.12.2, 2026.1.1, and 2026.2.0 contain an insecure direct object reference (IDOR) in the

CVE-2021-3138 HIGH POC
7.5 Jan 14

In Discourse 2.7.0 through beta1, a rate-limit bypass leads to a bypass of the 2FA requirement for certain forms. Rated

CVE-2026-26077 MEDIUM POC
6.5 Feb 26

Unauthenticated attackers can submit forged webhook payloads to multiple email provider integrations in Discourse versio

CVE-2023-38706 MEDIUM POC
6.5 Sep 15

Discourse is an open-source discussion platform. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploi

CVE-2024-53991 MEDIUM POC
5.9 Dec 19

Discourse is an open source platform for community discussion. Rated medium severity (CVSS 5.9), this vulnerability is r

CVE-2025-48877 CRITICAL
9.8 Jun 09

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

CVE-2023-47121 CRITICAL
9.8 Nov 10

Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is

CVE-2022-39355 CRITICAL
9.8 Oct 26

Discourse Patreon enables syncronization between Discourse Groups and Patreon rewards. Rated critical severity (CVSS 9.8

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy