What’s Vulnerable › Vulnerabilities
CVE-2025-48877: Discourse vulnerable to auto-executing of third-party code in embedded CodePen iframe
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-06-09 · updated 2026-06-17
- Weakness: CWE-1038
Description
Discourse is an open-source discussion platform. Prior to version 3.4.4 of the `stable` branch, version 3.5.0.beta5 of the `beta` branch, and version 3.5.0.beta6-dev of the `tests-passed` branch, Codepen is present in the default `allowed_iframes` site setting, and it can potentially auto-run arbitrary JS in the iframe scope, which is unintended. This issue is patched in version 3.4.4 of the `stable` branch, version 3.5.0.beta5 of the `beta` branch, and version 3.5.0.beta6-dev of the `tests-passed` branch. As a workaround, the Codepen prefix can be removed from a site's `allowed_iframes`.
Affected products
- discourse: before 3.4.4; before 3.5.0; 3.5.0-beta1, 3.5.0-beta2, 3.5.0-beta3, 3.5.0-beta4 — fixed in 3.4.4, 3.5.0
How to fix
Upgrade to a fixed version: discourse 3.4.4, 3.5.0. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2025-48877 or the next vulnerability affects your stack