Description
Discourse is an open source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1 and 2026.1.2, insufficient cleanup in the default Codepen allowed iframes value allows an attacker to trick a user into changing the URL of the main page. This issue has been fixed in versions 2026.3.0-latest.1, 2026.2.1 and 2026.1.2. To workaround this issue, remove Codepen from the list of allowed iframes.
Published: 2026-03-19
Score: 4.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: HTML injection that can redirect a user’s browser to a malicious URL
Action: Patch
AI Analysis

Impact

The vulnerability originates from insufficient sanitization of URLs allowed in the default Codepen iframe configuration. An attacker can craft content that, when viewed by a user, injects HTML into the page and tricks the browser into navigating to a different URL. This can enable phishing or social engineering attacks against users, but does not provide arbitrary code execution on the server.

Affected Systems

Discourse is affected for all releases prior to 2026.3.0-latest.1, 2026.2.1, and 2026.1.2. Users running those versions should verify their current build and apply updates accordingly.

Risk and Exploitability

The CVSS score of 4.1 indicates moderate severity, while the EPSS score of less than 1% shows a low likelihood of widespread exploitation at present. The vulnerability relies on a user viewing malicious content; no special privileges are needed. Native mitigations from Discourse are not listed in the CISA KEV catalog, reinforcing the need for a patch or configuration change.

Generated by OpenCVE AI on March 25, 2026 at 03:04 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Discourse to version 2026.3.0-latest.1, 2026.2.1, or 2026.1.2 to apply the official fix.
  • If an upgrade is not immediately possible, edit the allowed iframes list in the configuration and remove Codepen entries to block the vulnerable embeds.

Generated by OpenCVE AI on March 25, 2026 at 03:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 25 Mar 2026 01:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*
cpe:2.3:a:discourse:discourse:2026.3.0:*:*:*:latest:*:*:*

Sat, 21 Mar 2026 05:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 20 Mar 2026 09:00:00 +0000

Type Values Removed Values Added
First Time appeared Discourse
Discourse discourse
Vendors & Products Discourse
Discourse discourse

Thu, 19 Mar 2026 20:45:00 +0000

Type Values Removed Values Added
Description Discourse is an open source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1 and 2026.1.2, insufficient cleanup in the default Codepen allowed iframes value allows an attacker to trick a user into changing the URL of the main page. This issue has been fixed in versions 2026.3.0-latest.1, 2026.2.1 and 2026.1.2. To workaround this issue, remove Codepen from the list of allowed iframes.
Title Discourse vulnerable to HTML injection via prohibited iframe URLs
Weaknesses CWE-80
References
Metrics cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N'}


Subscriptions

Discourse Discourse
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-21T03:31:58.296Z

Reserved: 2026-02-18T00:18:53.962Z

Link: CVE-2026-27166

cve-icon Vulnrichment

Updated: 2026-03-21T03:31:52.352Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-19T21:17:08.740

Modified: 2026-03-25T01:06:00.000

Link: CVE-2026-27166

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-03-25T11:55:02Z

Weaknesses