CVE-2026-27166

Discourse vulnerable to HTML injection via prohibited iframe URLs

Published Mar 19, 2026 CVSS 3.1 · 4.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*
cpe:2.3:a:discourse:discourse:2026.3.0:*:*:*:latest:*:*:*
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Discourse
Discourse discourse
Vendors & Products Discourse
Discourse discourse
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'}

Weaknesses
  • CWE-80

    Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 21, 2026, 3:31 AM
Reserved
Feb 18, 2026, 12:18 AM
Status
Analyzed
Published
Mar 19, 2026, 9:17 PM
Modified
Jun 17, 2026, 10:26 AM