Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-91120 Overview
CVE-2026-91120 is a stored cross-site scripting (XSS) weakness [CWE-79] in Discourse, the open-source discussion platform. Provider-controlled video titles in lazy video embeds are reparsed as HTML when Discourse generates notification emails or chat summaries. An authenticated user with standard posting privileges can embed a YouTube, Vimeo, or TikTok video whose title contains markup. The email and chat-summary rendering path then injects that markup into the output instead of treating it as text. Recipients using HTML-capable email clients may render injected content, including event handlers. The forum page itself is not affected, and no Discourse browser session is directly exposed.
Critical Impact
HTML markup carried in third-party video titles can reach notification email and chat-summary recipients, enabling content injection in HTML-capable clients.
Affected Products
- Discourse versions prior to 2026.1.8
- Discourse versions prior to 2026.6.3
- Discourse versions prior to 2026.7.2 and 2026.8.0
Discovery Timeline
- 2026-09-24 - CVE-2026-91120 published to the National Vulnerability Database (NVD)
- 2026-09-24 - Last updated in NVD database
Technical Details for CVE-2026-91120
Vulnerability Analysis
The flaw sits in the discourse-lazy-videos plugin. When a post contains a supported provider URL (YouTube, Vimeo, TikTok), Discourse fetches Open Graph metadata and renders a lazy-loaded embed container. The provider-supplied title is interpolated directly into HTML attributes and later into email and chat-summary output. Because the summary path reparses the embed container, attribute content is treated as HTML rather than text. An attacker with ordinary posting rights can post a video whose provider title contains tags or event handlers. Any recipient viewing the resulting notification in an HTML-capable email client renders the injected content.
Root Cause
Two related issues produce the behavior. First, in plugins/discourse-lazy-videos/lib/discourse_lazy_videos/lazy_vimeo.rb and its sibling provider files, og_data.title is interpolated into data-video-title and title attributes without escaping. Second, in plugins/discourse-lazy-videos/plugin.rb, the summary path replaces each .lazy-video-container with a string built via interpolation ("<p><a href=\"#{href}\">#{title}</a></p>"), parsing the title as markup. The combination allows provider-controlled markup to survive into HTML emails and chat summaries.
Attack Vector
Exploitation requires an authenticated user and a provider whose title field attacker-controllable content can reach. The attacker crafts or selects a video whose title contains HTML, posts the URL to a Discourse forum with lazy embeds enabled (the default), and waits for Discourse to generate notification emails or chat summaries that include the embed.
# Patch: plugins/discourse-lazy-videos/lib/discourse_lazy_videos/lazy_vimeo.rb
# Escape provider title before interpolation into HTML attributes
iframe_id = iframe_src.sub("https://player.vimeo.com/video/", "")
end
escaped_title = ERB::Util.html_escape(og_data.title)
<<~HTML
<div class="vimeo-onebox lazy-video-container"
data-video-id="#{iframe_id}"
data-video-title="#{escaped_title}"
data-provider-name="vimeo">
<a href="https://vimeo.com/#{full_video_id}" target="_blank">
<img class="vimeo-thumbnail"
src="#{og_data.image}"
title="#{escaped_title}">
</a>
</div>
HTML
Source: Discourse Commit 6bf1cdcb
# Patch: plugins/discourse-lazy-videos/plugin.rb
# Build the replacement node via the DOM API so the title is a text node, not parsed HTML
fragment
.css(".lazy-video-container")
.each do |video|
link = fragment.document.create_element("a")
link["href"] = video.at_css("a")["href"].to_s
link.add_child(fragment.document.create_text_node(video["data-video-title"].to_s))
paragraph = fragment.document.create_element("p")
paragraph.add_child(link)
video.replace(paragraph)
end
end
end
Source: Discourse Commit 8338919d
Detection Methods for CVE-2026-91120
Indicators of Compromise
- Discourse posts referencing YouTube, Vimeo, or TikTok URLs where the fetched Open Graph title contains HTML tags, angle brackets, or on* event-handler attributes.
- Outbound notification or chat-summary emails whose rendered body contains unexpected <a>, <img>, or scripted elements inside the lazy video block.
- Entries in topic_links or oneboxed metadata tables where data-video-title includes encoded or raw markup characters.
Detection Strategies
- Scan recent posts and cached onebox metadata for provider titles containing <, >, onerror=, onload=, or javascript: tokens.
- Compare pre- and post-patch rendered email bodies for topics that embed third-party videos to identify any residual injected markup.
- Enable mail server content inspection to flag outbound Discourse notifications that contain HTML inside positions normally occupied by plain text titles.
Monitoring Recommendations
- Audit Discourse application logs for posts by low-reputation accounts that embed external videos shortly after account creation.
- Monitor the discourse-lazy-videos plugin version across all Discourse instances and alert on hosts running pre-fix builds.
- Track user reports from email recipients describing malformed or unexpected content inside Discourse notifications.
How to Mitigate CVE-2026-91120
Immediate Actions Required
- Upgrade Discourse to 2026.1.8, 2026.6.3, 2026.7.2, or 2026.8.0 depending on the release branch in use.
- Rebuild and restart Discourse containers so the patched discourse-lazy-videos plugin is loaded.
- Rotate any administrator sessions and review recent posts from newly registered accounts that embedded third-party videos.
Patch Information
The fix is tracked in Discourse Security Advisory GHSA-h7cg-2vww-m45c and implemented in Discourse Pull Request #42882. The patch calls ERB::Util.html_escape on og_data.title before interpolation and rebuilds the summary replacement via the Nokogiri DOM API so the title is attached as a text node. See commits 6bf1cdcb, 8338919d, e7de8285, and ed8b47df.
Workarounds
- Disable lazy video embeds in the Discourse admin settings until the patched release is deployed; note this changes default behavior.
- Remove or restrict the discourse-lazy-videos plugin on self-hosted instances that cannot upgrade immediately.
- Configure notification email templates to send plain-text alternatives so HTML-capable clients do not render injected markup.
# Disable lazy video embeds via Discourse admin (temporary mitigation)
# Admin -> Settings -> Posting
# Uncheck: lazy_videos_enabled
#
# Verify installed Discourse version from the container
cd /var/discourse
sudo ./launcher enter app
cat /var/www/discourse/VERSION
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

