Cross-site scripting in Discourse - CVE-2025-48877

 

Cross-site scripting in Discourse - CVE-2025-48877

Published: June 9, 2025 / Updated: July 1, 2026


Vulnerability identifier: #VU136107
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2025-48877
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote user to execute arbitrary JavaScript in the iframe scope.

The vulnerability exists due to improper neutralization of active content in embedded CodePen iframe handling when rendering user-supplied embedded CodePen content. A remote user can include a crafted CodePen embed to execute arbitrary JavaScript in the iframe scope.

The issue is related to CodePen being present in the default allowed_iframes site setting.


Affected software

Discourse

How to mitigate CVE-2025-48877

Install security update from vendor's website.

Discourse - addressed in versions 3.4.4, 3.5.0 beta5

External References

Related Security Bulletins