Description
Lemmy is a link aggregator and forum for the fediverse. Prior to lemmy-ui 0.19.19-beta.1, LemmyNet/lemmy-ui renders Markdown in src/shared/markdown.ts for post bodies, comment bodies, private messages, and community and site sidebars through mdToHtml, which returns a raw __html object that Inferno injects without a sanitizer pass. setupMarkdown configures html as false but registers markdown-it-html5-embed@1.0.0 with useImageSyntax enabled, so an image targeting video media becomes a video element whose fallback incorporates the image alt text through unescaped string replacement. The html setting does not apply to plugin-generated output, allowing crafted alt text to reach the DOM as live HTML in contexts that do not use mdToHtmlNoImages. An approved member or a remote federated instance can store such content, and a viewer who renders it may execute JavaScript in the lemmy-ui origin, exposing the viewer's session and authenticated actions. The advisory notes that Content Security Policy prevents the described exploit in production, but also states that the tested default self-hosted deployment serves no Content-Security-Policy. This issue is fixed in lemmy-ui version 0.19.19-beta.1.
Published: 2026-08-19
Score: 6.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Lemmy introduces arbitrary JavaScript into user sessions when a malicious actor embeds script code into the alt‑text of a markdown image that is rendered as a video element. Because the markdown renderer outputs raw HTML without sanitization and the plugin‑generated content bypasses the html flag, the alt text is injected directly into the DOM. When any user views the compromised post, comment, private message, or sidebar, the script executes with the Lemmy UI origin’s privileges, exposing session cookies and allowing the attacker to perform authenticated actions on behalf of the victim.

Affected Systems

The flaw affects LemmyNet’s Lemmy platform, specifically the lemmy‑ui component. Any release prior to 0.19.19‑beta.1 renders post bodies, comment bodies, private messages, and community or site sidebars using mdToHtml, creating the vulnerable injection path. The vulnerability is therefore present in all pre‑0.19.19‑beta.1 distributions of lemmy‑ui and any self‑hosted deployment that has not applied the patch or that omits a Content‑Security‑Policy header.

Risk and Exploitability

With a CVSS score of 6.4, the vulnerability is considered moderate in severity. EPSS data is not available, so the current exploitation probability is unclear, but the issue can be triggered remotely via federated instances or by any member with write access to content. The advisory notes that a properly configured CSP can mitigate the impact; however, default self‑hosted configurations do not supply a CSP header, leaving the system exposed until patching or a mitigation is applied.

Generated by OpenCVE AI on August 20, 2026 at 11:44 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade lemmy‑ui to version 0.19.19‑beta.1 or later, which removes the unsanitized alt‑text injection path.
  • Configure a strict Content‑Security‑Policy that forbids inline scripts for the lemmy‑ui origin to block script execution.
  • If an immediate upgrade is not possible, disable or reconfigure the markdown‑it‑html5‑embed plugin to prevent images from being rendered as video embeds, or remove image syntax support from the markdown renderer.

Generated by OpenCVE AI on August 20, 2026 at 11:44 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 21 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 19 Aug 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Lemmynet
Lemmynet lemmy
Vendors & Products Lemmynet
Lemmynet lemmy

Wed, 19 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Description Lemmy is a link aggregator and forum for the fediverse. Prior to lemmy-ui 0.19.19-beta.1, LemmyNet/lemmy-ui renders Markdown in src/shared/markdown.ts for post bodies, comment bodies, private messages, and community and site sidebars through mdToHtml, which returns a raw __html object that Inferno injects without a sanitizer pass. setupMarkdown configures html as false but registers markdown-it-html5-embed@1.0.0 with useImageSyntax enabled, so an image targeting video media becomes a video element whose fallback incorporates the image alt text through unescaped string replacement. The html setting does not apply to plugin-generated output, allowing crafted alt text to reach the DOM as live HTML in contexts that do not use mdToHtmlNoImages. An approved member or a remote federated instance can store such content, and a viewer who renders it may execute JavaScript in the lemmy-ui origin, exposing the viewer's session and authenticated actions. The advisory notes that Content Security Policy prevents the described exploit in production, but also states that the tested default self-hosted deployment serves no Content-Security-Policy. This issue is fixed in lemmy-ui version 0.19.19-beta.1.
Title Lemmy: Stored XSS via markdown image alt-text in lemmy-ui html5-embed
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 6.4, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T18:17:01.041Z

Reserved: 2026-06-15T23:12:41.964Z

Link: CVE-2026-54743

cve-icon Vulnrichment

Updated: 2026-08-21T18:16:56.789Z

cve-icon NVD

Status : Received

Published: 2026-08-19T21:16:58.657

Modified: 2026-08-21T19:17:03.757

Link: CVE-2026-54743

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T11:45:17Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')