We run a Discourse forum and received an external report claiming a stored code-injection vulnerability via the onebox / allowed_onebox_iframes mechanism. Before we act on it, I’d like help from the community/team confirming whether the described behavior is actually possible on current Discourse.
The report claims:
- Discourse oneboxes a bare URL on its own line and embeds the page’s
twitter:playeras an iframe for all viewers. - Origin matching for the iframe allowlist is “prefix-only,” so a host like
www.youtube.com.attacker.examplewould be accepted as a legitimate YouTube embed while serving attacker-controlled HTML. - The default
allowed_onebox_iframesis effectively a wildcard.
My understanding is that (a) Discourse matches allowlisted iframe hosts on a domain-boundary basis rather than a bare prefix, and (b) the default onebox iframe allowlist is a curated provider list, not *. Can someone confirm how host matching for allowed_onebox_iframes works in the current version, and whether a subdomain-suffix trick like the one described could actually pass validation?
We’re on Discourse version v2026.8.0-latest . Happy to share the raw report privately with the security team if useful.
Thanks.