Read the docs

HTML injection in Discourse notification emails

Priority LOW 26CWE-79Published · Updated

Key facts

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

Attack profile from CVSS 4.0 · GHSA-rvpj-7hfp-hq58. Fix status from GitHub. Impact type from CWE-79.

Summary

Discourse from 2026.7.0-latest before 2026.7.5, 2026.9.0-latest before 2026.9.2 and 2026.10.0-latest before 2026.10.1 is affected. Notification emails are built by inserting post content into HTML strings, so a user can craft a post whose emails to other users contain injected HTML attributes (CWE-79). The iframe case requires an origin allowed by allowed_iframes, and the image case requires secure_uploads_allow_embed_images_in_emails to be enabled.

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

Description from the GitHub advisory

### Impact When rendering notification emails, Discourse converts embedded iframes into links and inlines images from secure uploads. Both were built by inserting post content into HTML strings. A user could craft a post so that the notification emails other users receive for it contained injected HTML attributes, for example to restyle the email or disguise a link. The iframe case requires the iframe's origin to be allowed by the `allowed_iframes` site setting. The image case requires secure uploads with `secure_uploads_allow_embed_images_in_emails` enabled. ### Patches The link and image are now built as HTML nodes, and image dimensions must be numeric. Fixed in `2026.11.0-latest`. Fixed release versions will be added after the fix and backports are released. ### Workarounds Disable `secure_uploads_allow_embed_images_in_emails` to mitigate the image case. For the iframe case, remove unneeded origins from `allowed_iframes`; this disables those embeds in posts. ### 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-rvpj-7hfp-hq58
—Discourse>= 2026.10.0-latest2026.10.1Patch availableGHSA-rvpj-7hfp-hq58
—Discourse>= 2026.9.0-latest2026.9.2Patch availableGHSA-rvpj-7hfp-hq58
—Discourse>= 2026.7.0-latest2026.7.5Patch availableGHSA-rvpj-7hfp-hq58
  • Discourse Vendor— Affected — Fixed in 2026.11.0-latest.1 Patch available GHSA-rvpj-7hfp-hq58
  • Discourse Vendor— Affected >= 2026.10.0-latest Fixed in 2026.10.1 Patch available GHSA-rvpj-7hfp-hq58
  • Discourse Vendor— Affected >= 2026.9.0-latest Fixed in 2026.9.2 Patch available GHSA-rvpj-7hfp-hq58
  • Discourse Vendor— Affected >= 2026.7.0-latest Fixed in 2026.7.5 Patch available GHSA-rvpj-7hfp-hq58

Remediation

Upgrade Discourse to 2026.11.0-latest.1, 2026.10.1, 2026.9.2 or 2026.7.5, matching your release line. Until you upgrade, disable secure_uploads_allow_embed_images_in_emails to stop the image case, and remove unneeded origins from allowed_iframes to disable those iframe embeds in posts.

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

  • Fix · GHSA-rvpj-7hfp-hq58 Discourse Fixed in 2026.11.0-latest.1 Advisory →
  • Fix · GHSA-rvpj-7hfp-hq58 Discourse Fixed in 2026.10.1 Advisory →
  • Fix · GHSA-rvpj-7hfp-hq58 Discourse Fixed in 2026.9.2 Advisory →
  • Fix · GHSA-rvpj-7hfp-hq58 Discourse Fixed in 2026.7.5 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-rvpj-7hfp-hq58

References

Sources

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