CVE-2026-74234: Legora < 2026-08-14 XSS via Mermaid gray-matter JavaScript Engine

Published Aug 17, 2026
·
Updated

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.

Affected Software

1 affected component
Legora<2026-08-14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Legora to a version that resolves this vulnerability.

    Fixed in 2026-08-14
  2. Configuration

    Reduce impact in add-in surfaces by ensuring bearer session tokens are not persisted in localStorage (since elevated impact occurs where tokens are stored there).

    Word add-in / Outlook add-in (bearer session token storage) localStorage persistence of bearer session tokens = remove/disable persistence in localStorage
  3. Compensating control

    Mitigate exposure by preventing untrusted users or content from influencing rendered Mermaid diagram content (especially Mermaid blocks with gray-matter JavaScript front-matter directives that could trigger eval() before SVG sanitization).

  4. Operational

    After upgrading, rotate any bearer/session tokens potentially exposed via localStorage to invalidate attacker access.

Event History

Aug 17, 2026
CVE Published
via MITRE·07:38 PM
Data Sourced
via MITRE·07:38 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-74234?

CVE-2026-74234 has a severity rating of high, with a score of 7.7.

2

How do I fix CVE-2026-74234?

To mitigate CVE-2026-74234, upgrade Legora to version 2026-08-14 or later.

3

What type of vulnerability is CVE-2026-74234?

CVE-2026-74234 is a cross-site scripting (XSS) vulnerability.

4

What impact does CVE-2026-74234 have on users?

CVE-2026-74234 allows attackers to execute arbitrary JavaScript in a victim's browser.

5

Which software is affected by CVE-2026-74234?

CVE-2026-74234 affects Legora versions prior to 2026-08-14.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203