Description
Legora before 2026-08-14 contains a cross-site scripting vulnerability that allows attackers to achieve arbitrary JavaScript execution in a victim's browser by embedding a Mermaid block prefixed with a gray-matter JavaScript front-matter directive, causing the front-matter parser to invoke eval() before any SVG sanitization occurs. Attackers can exploit this flaw through influenced Mermaid diagram content to execute arbitrary JavaScript in the user's browser context, with elevated impact on Word and Outlook add-in surfaces where bearer session tokens are persisted in localStorage.
Published: 2026-08-17
Score: 5.1 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Legora before the 2026-08-14 release contains a cross‑site scripting flaw that allows attackers to execute arbitrary JavaScript in a victim’s browser. By embedding a Mermaid diagram prefixed with a gray‑matter front‑matter directive, the front‑matter parser calls eval() before the SVG is sanitized, exposing the browser to script execution. If the victim uses Legora’s Word or Outlook add‑in, the attacker can reach the add‑in’s JavaScript context, potentially reading or exfiltrating session tokens stored in localStorage.

Affected Systems

Legora users running the Legora platform prior to the 2026-08-14 update are affected, including the Word and Outlook add‑in versions that persist bearer session tokens in localStorage. No specific build numbers are listed, so all instances before this date should be reviewed.

Risk and Exploitability

The CVSS score is 5.1, indicating moderate risk. EPSS data is unavailable, and the vulnerability is not listed in CISA’s KEV catalog, suggesting limited public exploitation data. Attackers can inject malicious Mermaid content through any input channel that renders Mermaid diagrams, such as user‑generated content or files. Because this is a client‑side flaw with no authentication requirement, the threat vector is primarily user‑side injection, but the impact on add‑in contexts raises the potential for credential theft and lateral movement.

Generated by OpenCVE AI on August 17, 2026 at 21:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Legora to version 2026-08-14 or newer to eliminate the vulnerable front‑matter processing path.
  • Restrict or disable the rendering of Mermaid diagrams in untrusted user input contexts; ensure that any rendering occurs after proper sanitization and without the use of eval().
  • Add a strict Content‑Security‑Policy that blocks the use of eval() and limits JavaScript execution to trusted sources on pages that include add‑in functionality.

Generated by OpenCVE AI on August 17, 2026 at 21:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 17 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 17 Aug 2026 20:00:00 +0000

Type Values Removed Values Added
Description Legora before 2026-08-14 contains a cross-site scripting vulnerability that allows attackers to achieve arbitrary JavaScript execution in a victim's browser by embedding a Mermaid block prefixed with a gray-matter JavaScript front-matter directive, causing the front-matter parser to invoke eval() before any SVG sanitization occurs. Attackers can exploit this flaw through influenced Mermaid diagram content to execute arbitrary JavaScript in the user's browser context, with elevated impact on Word and Outlook add-in surfaces where bearer session tokens are persisted in localStorage.
Title Legora < 2026-08-14 XSS via Mermaid gray-matter JavaScript Engine
Weaknesses CWE-95
References
Metrics cvssV3_1

{'score': 7.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N'}

cvssV4_0

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


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-17T19:55:37.779Z

Reserved: 2026-08-14T18:01:19.917Z

Link: CVE-2026-74234

cve-icon Vulnrichment

Updated: 2026-08-17T19:55:31.824Z

cve-icon NVD

Status : Received

Published: 2026-08-17T20:16:46.813

Modified: 2026-08-17T20:16:46.813

Link: CVE-2026-74234

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-17T21:45:03Z

Weaknesses
  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')