# CVE-2026-27166: Discourse vulnerable to HTML injection via prohibited iframe URLs

- Severity: Medium 4.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-02)
- Published: 2026-03-19T20:29:22.570Z
- Modified: 2026-09-08T08:46:21.587Z
- Also known as: BIT-DISCOURSE-2026-27166, GHSA-h653-cq78-vjj2
- Weaknesses: CWE-80
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- discourse discourse: < 2026.3.0-latest.1; >= 2026.2.0-latest, < 2026.2.1; >= 2026.1.0-latest, < 2026.1.2; before 2026.3.0; from 2026.1.0 before 2026.1.2; from 2026.2.0 before 2026.2.1; 2026.3.0
- discourse (Bitnami): from 2026.1.0 before 2026.1.2; from 2026.2.0 before 2026.2.1; from 2026.3.0 before 2026.3.0

## Every score

- GitHub_M: CVSS:3.1 4.1 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/discourse/discourse/security/advisories/GHSA-h653-cq78-vjj2> (advisory, vendor-advisory)
- <https://github.com/discourse/discourse/commit/c4762a4fac2f61f52f325396b11d3aeb955ea925> (fix, patch)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-27166> (web)

## Sources

- CVE List: [CVE-2026-27166](https://www.cve.org/CVERecord?id=CVE-2026-27166), CVE Terms of Use, modified 2026-03-21
- NVD: [CVE-2026-27166](https://nvd.nist.gov/vuln/detail/CVE-2026-27166), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-DISCOURSE-2026-27166](https://osv.dev/vulnerability/BIT-DISCOURSE-2026-27166), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-27166 · Whole record: https://cve.day/CVE-2026-27166.json · Rebuilt by cve.day 2026-11-25T22:59:16.185Z
