CVE-2026-27166
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network with a low-privilege account, but needs a user to act. Limited direct impact.
- Exploit odds
- 0.2% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.2% in the next 30 days (EPSS).
- Severity: 4.1 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.2% · EPSS, next 30 days
- Weakness
- CWE-80
- Record status
- Analyzed
Affected
- Discourse < 2026.3.0
- Discourse < 2026.1.2
- Discourse < 2026.2.1
- Discourse 2026.3.0
Attack profile CVSS 3.1 · 4.1
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2026-27166.md and follow it. Check whether this project is affected by CVE-2026-27166. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/discourse/discourse/commit/c4762a4fac2f61f52f325396b11d3aeb955ea925
- https://github.com/discourse/discourse/security/advisories/GHSA-h653-cq78-vjj2