Skip to main content

Discourse CVE-2025-48877

| EUVDEUVD-2025-17469 CRITICAL
Insecure Automated Optimizations (CWE-1038)
2025-06-09 security-advisories@github.com
9.8
CVSS 3.1 · GitHub Advisory
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Insecure automated optimizations
Impact

This vulnerability presents critical real-world risk validated by multiple signals: (1) CVSS 9.8 with AV:N/AC:L/PR:N/UI:N indicates maximum exploitability—network-accessible, low complexity, unauthenticated, no user interaction required; (2) Affects default configurations, meaning all unpatched Discourse instances are vulnerable out-of-the-box; (3) Attack surface is extremely broad—any forum user can post content embedding malicious Codepen iframes; (4) Impact is complete system compromise (Confidentiality/Integrity/Availability all HIGH); (5) No workaround removes the vulnerability entirely, only mitigates via manual configuration. This is not a high-CVSS-but-low-risk issue—it is a genuine critical vulnerability requiring emergency patching. EPSS exploitation probability would be expected to be high given the trivial attack requirements and default vulnerable state.

Exploit ScenarioDerived

An attacker visits a vulnerable Discourse forum (default configuration, unpatched). Without authentication, the attacker creates or edits a post containing an embedded Codepen iframe with malicious JavaScript payload, such as: <iframe src='https://codepen.io/pen/?editors=0010&_x_tr_sl=auto' data-onload='malicious_js_here'></iframe>. When any forum visitor (including administrators) views the post, Codepen auto-executes the JavaScript in the user's browser context within the forum domain, allowing the attacker to steal session cookies, hijack accounts, modify forum content, escalate privileges to administrator, or inject malware for distribution. The attack requires zero user interaction beyond normal forum browsing, affects all visitors equally, and can propagate via quote-sharing of infected posts. No proof-of-concept publication is required due to the straightforward attack methodology.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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 – Mar 14, 2026

Discourse versions prior to 3.4.4 (stable), 3.5.0.beta5 (beta), and 3.5.0.beta6-dev (tests-passed) contain a critical vulnerability where Codepen is included in the default allowed_iframes site setting and can auto-execute arbitrary JavaScript within the iframe scope, enabling unauthenticated remote code execution. With a CVSS score of 9.8 and network-accessible attack vector requiring no privileges or user interaction, this vulnerability poses severe risk to all default Discourse installations and should be prioritized for immediate patching.

RemediationAI

Upgrade to patched versions immediately; versions: ['3.4.4 or later (stable branch)', '3.5.0.beta5 or later (beta branch)', '3.5.0.beta6-dev or later (tests-passed branch)']; instructions: Apply security update through standard Discourse update mechanism or Docker image refresh Workaround: Remove Codepen from allowed_iframes site setting; instructions: Navigate to Admin > Settings > Security > allowed_iframes and remove any Codepen domain entries (codepen.io, *.codepen.io, etc.) until patch is applied; effectiveness: Prevents exploitation but removes Codepen embedding functionality Monitoring: Audit existing forum content for malicious Codepen embeds; instructions: Search post content database for Codepen iframe references created by untrusted users during vulnerable period; review access logs for suspicious activity

Affected VersionsENISA

discourse < 3.4.4
discourse < 3.5.0.beta5
discourse < 3.5.0.beta6-dev

Affected Packages

euvd discourse fix: 3.4.4, 3.5.0.beta5, 3.5.0.beta6-dev

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package 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 allowed_iframes site setting controls which external domains can be embedded as iframes within forum content. Codepen embeds were included in the default allowlist to enable code snippet sharing. The vulnerability arises from CWE-1038 (Improper Restriction of Rendered UI Layers or Frames), where Codepen's iframe implementation can auto-execute JavaScript payloads passed via iframe attributes or URL parameters, bypassing expected sandbox restrictions. This occurs because Codepen does not enforce strict content security policies or sandbox attribute restrictions that would prevent script execution. The issue affects all installations using default site settings without explicit configuration changes, impacting deployments across CPE:2.3:a:discourse:discourse:*:*:*:*:*:*:*:* where version < 3.4.4 (stable branch).

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

GitHub Advisory PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

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

Lifecycle Timeline

3
Analysis Updated
Apr 16, 2026 - 05:55 EUVD-patch-fix
executive summary
Patch available
Apr 16, 2026 - 05:29 EUVD
3.4.4,3.5.0.beta5,3.5.0.beta6-dev
CVE Published
Jun 09, 2025 - 13:15 nvd
CRITICAL 9.8

DescriptionGitHub Advisory

Discourse is an open-source discussion platform. Prior to version 3.4.4 of the stable branch, version 3.5.0.beta5 of the beta branch, and version 3.5.0.beta6-dev of the tests-passed branch, Codepen is present in the default allowed_iframes site setting, and it can potentially auto-run arbitrary JS in the iframe scope, which is unintended. This issue is patched in version 3.4.4 of the stable branch, version 3.5.0.beta5 of the beta branch, and version 3.5.0.beta6-dev of the tests-passed branch. As a workaround, the Codepen prefix can be removed from a site's allowed_iframes.

Executive ViewAI

Why It Matters

Discourse versions before 3.4.4 contain a critical unauthenticated remote code execution vulnerability affecting all default installations. An attacker can embed malicious Codepen iframes that auto-execute arbitrary JavaScript, potentially compromising the entire Discourse forum, user data, and underlying infrastructure without requiring authentication or user interaction. Organizations running affected Discourse versions face immediate risk of platform compromise and should patch within hours.

Business Impact: Severe
Compensating Controls

Vendor-released patch: Upgrade to Discourse 3.4.4 (stable), 3.5.0.beta5 (beta), or 3.5.0.beta6-dev (tests-passed) or later. Interim mitigation if patch cannot be deployed immediately: Disable or remove 'codepen.com' from the allowed_iframes site setting via Admin > Settings > Security, and implement network-level restrictions blocking external iframe content until patching is complete.

Threat Intelligence Overview

EPSS Score
0.2%
Top 61% exploitable
Data Quality
5 sources
Confidence: Medium

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Related Vulnerabilities in Discourse XSS and Resource Exhaustion Flaws

View all 3
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-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

CVE-2021-41163 CRITICAL
9.8 Oct 20

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

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