Cyber Resilience

CVE-2026-27166

XSS in Discourse ≤ 2026.3.0

Published
19 March 2026
Modified
25 March 2026
Patch / advisory
CVSS Score v3.1 4.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N
EPSS Score 0.0019 8th percentile
Risk Priority 32 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-27166 is a medium-severity Basic XSS (CWE-80) vulnerability in Discourse Discourse. Its CVSS base score is 4.1 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Content Injection (T1659); ranked at the 8th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1659 Content Injection Initial Access
Adversaries may gain access and continuously communicate with victims by injecting malicious content into systems through online network traffic.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-58054Same product: Discourse Discourse
CVE-2026-32273Same product: Discourse Discourse
CVE-2024-53266Same product: Discourse Discourse
CVE-2026-27570Same product: Discourse Discourse
CVE-2024-37165Same product: Discourse Discourse
CVE-2023-25172Same product: Discourse Discourse
CVE-2025-67723Same product: Discourse Discourse
CVE-2024-47772Same product: Discourse Discourse
CVE-2026-33411Same product: Discourse Discourse
CVE-2024-35234Same product: Discourse Discourse

Affected Assets

discourse
discourse
2026.3.0 · ≤ 2026.3.0 · 2026.1.0 — 2026.1.2 · 2026.2.0 — 2026.2.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.2.1
  • V1.3.1
  • V1.3.3
  • V1.3.4

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover missing or incorrect neutralization of script tags through targeted XSS test cases.

Input validation explicitly requires checking and neutralizing untrusted web inputs containing script-related characters before they reach a downstream renderer.

Secure engineering principles include mandatory output encoding and neutralization of HTML metacharacters to stop injection at the source.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require output encoding and input validation that prevent basic XSS.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches unneutralized script tags before release.

prevents

Secure SDLC mandates input validation and output encoding that directly prevent basic XSS.

prevents

Application security requirements explicitly call for neutralization of script-related HTML tags.

prevents

Secure coding standards require proper escaping of <, >, & to block XSS.

References