LOW 3.5

CVE-2026-59791: JetBrains YouTrack CSS Injection in Mermaid Diagrams – Patch 2026.2.17012

JetBrains YouTrack versions before 2026.2.17012 contain a CSS injection vulnerability in the Mermaid diagram rendering feature. An authenticated user can inject malicious CSS through diagram content, potentially allowing them to deface or manipulate how information appears to other users viewing the same diagrams. This is a low-severity issue because it requires authentication, user interaction, and affects only the presentation layer without compromising data confidentiality or system availability.

Source data · NVD / CISA · public domain

CVSS
3.1 · 3.5 LOW · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N
Weaknesses (CWE)
CWE-1021
Affected products
1 configuration(s)
Published / Modified
2026-07-10 / 2026-07-10

NVD description (verbatim)

In JetBrains YouTrack before 2026.2.17012 cSS injection via Mermaid diagram rendering was possible

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-59791 is a CSS injection flaw (CWE-1021) in YouTrack's Mermaid diagram rendering pipeline. The vulnerability arises when user-supplied CSS is not properly sanitized before being applied to diagram elements. An authenticated user can embed malicious CSS in a Mermaid diagram definition, which executes in the browser context of other users viewing that diagram. The attack requires the attacker to have valid authentication credentials and depends on the victim clicking or viewing the malicious diagram, limiting the practical scope.

Business impact

While the risk score is low, CSS injection can enable social engineering attacks or phishing campaigns by allowing attackers to modify the visual presentation of YouTrack content. An attacker with account access could create misleading diagrams, inject fake instructions, or craft visually convincing fake authentication prompts. For organizations using YouTrack for critical workflow documentation or project tracking, such defacement could erode trust in the system and require time to remediate and audit affected diagrams.

Affected systems

JetBrains YouTrack instances running versions before 2026.2.17012 are affected. The vulnerability is specific to the Mermaid diagram rendering component and only impacts users who interact with diagrams created or modified by authenticated attackers. On-premises and cloud-hosted YouTrack deployments are both vulnerable if not updated.

Exploitability

Exploitability is low to moderate in practice. The attack requires a valid YouTrack user account (elevated barrier for external attackers), relies on victim interaction (viewing the diagram), and produces no authentication bypass or data exfiltration. An insider with legitimate access poses the primary risk. No publicly known exploitation in the wild is tracked by CISA KEV at this time.

Remediation

Upgrade JetBrains YouTrack to version 2026.2.17012 or later. This patch addresses the CSS injection flaw by implementing proper sanitization and escaping of CSS in Mermaid diagram rendering. Organizations should plan patching during a maintenance window, though the low severity allows for standard change control rather than emergency procedures.

Patch guidance

JetBrains has released YouTrack 2026.2.17012 and later versions containing the fix. Consult the JetBrains YouTrack release notes and security advisory for specific upgrade procedures. For on-premises installations, follow your organization's standard patch management workflow. Cloud-hosted instances may be automatically updated; verify your deployment status in the YouTrack administration console. Test the patch in a non-production environment if feasible to ensure diagram rendering functionality is not disrupted.

Detection guidance

Monitor YouTrack audit logs for diagram creation or modification events by users with unusual activity patterns. Search audit trails for diagram content containing CSS keywords (e.g., 'style', 'javascript:', 'onload') in Mermaid definitions. Review browser developer tools (F12) when viewing suspect diagrams to identify injected CSS rules. Implement Content Security Policy (CSP) headers if not already in place to mitigate CSS injection impact. Consider restricting who can create or edit diagrams in YouTrack's permission model as a compensating control.

Why prioritize this

This vulnerability merits standard priority patching rather than emergency treatment. The CVSS 3.5 score reflects the combination of network accessibility but mandatory authentication, user interaction, and integrity-only impact. No exploit has been added to the CISA Known Exploited Vulnerabilities catalog. Prioritize this alongside other routine security updates, but do not defer indefinitely—insider threats or compromised accounts could weaponize the flaw.

Risk score, explained

The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N) yields a score of 3.5, rated LOW. Attack Vector is Network (YouTrack is typically web-accessible), but Privileges Required (PR:L) and User Interaction (UI:R) are mandatory, significantly reducing real-world attack surface. Confidentiality impact is None, and Availability impact is None; only Integrity is affected and only minimally (visual presentation). This score appropriately reflects a localized, low-impact defacement risk rather than a critical system compromise.

Frequently asked questions

Can this vulnerability be exploited remotely without authentication?

No. The CVSS vector requires PR:L (authenticated user privilege), meaning the attacker must have a valid YouTrack account. Remote, unauthenticated exploitation is not possible. However, compromised or malicious insider accounts remain a concern.

What happens if I view a diagram with injected CSS?

The malicious CSS executes in your browser's rendering context when you view the diagram. In most cases, this can alter the visual appearance of the diagram or page (e.g., hiding elements, changing colors, displaying fake messages). Modern browsers and browser security policies limit the impact, preventing direct access to sensitive data or cookies in most configurations. The risk is mainly phishing or social engineering through visual deception.

Is there a workaround if I cannot patch immediately?

Restrict diagram editing permissions to a trusted subset of users, reducing the attack surface. Disable or hide the Mermaid diagram feature if it is not critical to your workflow. Educate users to scrutinize unusual diagram content. Implement a strict CSP header to limit CSS injection impact. However, these are temporary measures; upgrading to 2026.2.17012 or later is the recommended permanent fix.

Does this affect YouTrack on-premises and cloud deployments equally?

Both deployment models are vulnerable if running unpatched versions before 2026.2.17012. Cloud-hosted instances may be patched automatically by JetBrains, depending on your subscription and deployment model; verify with your cloud provider or YouTrack admin console. On-premises users must manually apply the patch.

This analysis is provided for informational purposes to assist security professionals in vulnerability management and risk prioritization. The information herein is based on public disclosure data and vendor advisories current as of the publication date. SEC.co does not verify patch version numbers or exploit details independently; confirm all patch versions and remediation guidance directly with JetBrains' official security advisory and release notes. This vulnerability does not appear on the CISA KEV list as of the analysis date. Security teams should conduct their own testing and validation before deploying patches in production environments. No liability is assumed for decisions made based on this analysis. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).