Read the docs

HTML injection in Discourse oneboxes via external page metadata

Priority LOW 38CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Cross-site scripting
Confidentiality · integrity · availability
None · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · GHSA-7c2f-pwg6-cx2p. Fix status from GitHub. Impact type from CWE-79.

Summary

Discourse oneboxes display metadata from linked pages, and several onebox renderers insert that external metadata into HTML without escaping it (CWE-79). Discourse 2026.7.0-latest and later releases before their fixes are affected. A user who posts a link to a page they control can inject HTML into the onebox stored in their post, and that HTML is shown to everyone who views the post and can be styled to cover the page with fake content. Scripts are still removed.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

### Impact Oneboxes display metadata from the linked page, such as its title, description or image size. Several onebox renderers inserted these values into HTML without escaping them, so a user who posts a link to a page they control could inject HTML into the onebox stored in their post. That HTML is shown to everyone who views the post, and can be styled, for example to cover the page with fake content. Scripts are still removed. The same applies to some site-specific oneboxes when the uploader controls the title or text, for example X/Twitter and Threads posts or Flickr, Imgur and Google Photos albums. ### Patches External metadata is now escaped in all onebox renderers. Fixed in `2026.11.0-latest`. Fixed release versions will be added after the fix and backports are released. Posts cooked before the fix keep the injected HTML until they are rebaked. ### Workarounds Set `max_oneboxes_per_post` to `0` to stop new posts from getting oneboxes. Existing posts are not affected by the setting. ### References None.

Why it matters now

Fix Fixed Discourse: 2026.11.0-latest.1, 2026.10.1, 2026.9.2 +1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—Discourse—2026.11.0-latest.1Patch availableGHSA-7c2f-pwg6-cx2p
—Discourse>= 2026.10.0-latest2026.10.1Patch availableGHSA-7c2f-pwg6-cx2p
—Discourse>= 2026.9.0-latest2026.9.2Patch availableGHSA-7c2f-pwg6-cx2p
—Discourse>= 2026.7.0-latest2026.7.5Patch availableGHSA-7c2f-pwg6-cx2p
  • Discourse Vendor— Affected — Fixed in 2026.11.0-latest.1 Patch available GHSA-7c2f-pwg6-cx2p
  • Discourse Vendor— Affected >= 2026.10.0-latest Fixed in 2026.10.1 Patch available GHSA-7c2f-pwg6-cx2p
  • Discourse Vendor— Affected >= 2026.9.0-latest Fixed in 2026.9.2 Patch available GHSA-7c2f-pwg6-cx2p
  • Discourse Vendor— Affected >= 2026.7.0-latest Fixed in 2026.7.5 Patch available GHSA-7c2f-pwg6-cx2p

Remediation

Discourse fixed versions are 2026.11.0-latest.1, 2026.10.1, 2026.9.2 and 2026.7.5. Posts cooked before the fix keep the injected HTML until they are rebaked. As a workaround, set max_oneboxes_per_post to 0, which stops new posts from getting oneboxes.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-7c2f-pwg6-cx2p Discourse Fixed in 2026.11.0-latest.1 Advisory →
  • Fix · GHSA-7c2f-pwg6-cx2p Discourse Fixed in 2026.10.1 Advisory →
  • Fix · GHSA-7c2f-pwg6-cx2p Discourse Fixed in 2026.9.2 Advisory →
  • Fix · GHSA-7c2f-pwg6-cx2p Discourse Fixed in 2026.7.5 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-7c2f-pwg6-cx2p

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences