CVE-2026-58487
Deferred Deferred - Pending Action

Stored HTML Injection in HedgeDoc Prior to 1.11.0

Vulnerability report for CVE-2026-58487, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-13

Last updated on: 2026-07-15

Assigner: GitHub, Inc.

Description

HedgeDoc is an open source, real-time, collaborative, markdown notes application. Prior to version 1.11.0, due to unsafe handling of the local-part of registered email addresses, HedgeDoc was vulnerable to stored HTML Injection through its publish and slide views. An attacker could register a specially crafted email address and inject arbitrary HTML into pages viewed by other users. HedgeDoc accepted RFC 5321 quoted-string local-parts in email addresses during registration. The local-part was then reused as the user's display name without escaping and rendered into HTML in multiple places, including publish and slide views as well as the collaborative editor. An attacker could break out of an HTML attribute and inject arbitrary markup into the page. While the deployed Content-Security-Policy prevented straightforward inline JavaScript execution, the injected HTML was still sufficient to alter page content and embed attacker-controlled resources such as cross-origin iframes. This issue was fixed in version 1.11.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-13
Last Modified
2026-07-15
Generated
2026-08-03
AI Q&A
2026-07-14
EPSS Evaluated
2026-08-01
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
hedgedoc hedgedoc to 1.11.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-58487 is a stored HTML injection vulnerability in HedgeDoc, an open-source real-time collaborative markdown notes application. Prior to version 1.11.0, HedgeDoc improperly handled the local-part of registered email addresses, allowing attackers to inject arbitrary HTML into pages viewed by other users.

The vulnerability arises because HedgeDoc accepted RFC 5321 quoted-string local-parts in email addresses during user registration. The local-part of the email (the part before the @ symbol) was used as the user's display name without proper escaping. This unescaped display name was then rendered into HTML in multiple places, including publish views, slide views, and the collaborative editor.

An attacker could exploit this by registering an email address with a specially crafted local-part containing malicious HTML. When other users viewed affected pages, the injected HTML would execute, allowing the attacker to alter page content or embed attacker-controlled resources like cross-origin iframes. While the Content-Security-Policy in place prevented straightforward inline JavaScript execution, the injected HTML could still manipulate the page's appearance and behavior.

This issue was fixed in HedgeDoc version 1.11.0.

Detection Guidance

Detecting this vulnerability on your network or system involves checking for signs of stored HTML injection in HedgeDoc instances, particularly in user display names derived from email local-parts. Since the vulnerability arises from improper escaping of display names in publish and slide views, you can inspect these views for unexpected HTML markup or suspicious user registrations.

  • Check HedgeDoc version: Verify if your HedgeDoc instance is running a version prior to 1.11.0, as the vulnerability was fixed in this version. You can typically find the version in the application's footer, admin dashboard, or by inspecting the source code or package files.
  • Inspect user registrations: Review the list of registered users for email addresses with unusual local-parts, such as those containing quotes, angle brackets, or other special characters that could be used for HTML injection (e.g., "user<script>alert(1)</script>@example.com").
  • Manually test publish and slide views: Create a test user with an email address containing a benign HTML payload (e.g., "test"@example.com) and check if the display name renders as raw HTML in publish or slide views. Look for broken attributes or unexpected markup.
  • Review logs for suspicious activity: Check server logs for unusual registration patterns or repeated access to publish/slide views by the same user, which might indicate exploitation attempts.

Commands or tools to assist detection:

  • To check the HedgeDoc version via command line (if you have access to the server): grep -r "version" /path/to/hedgedoc/package.json or check the application's admin interface.
  • To inspect user data in the database (if using a supported database like PostgreSQL): Run a query like SELECT email FROM users WHERE email LIKE '%"%' OR email LIKE '%<%' OR email LIKE '%>%'; to find potentially malicious email addresses.
  • Use a web vulnerability scanner like OWASP ZAP or Burp Suite to scan for stored XSS or HTML injection vulnerabilities in HedgeDoc's publish and slide views.
Impact Analysis

If you are using a vulnerable version of HedgeDoc (prior to 1.11.0), this vulnerability could impact you in several ways:

  • An attacker could inject malicious HTML into pages you view, altering the content or appearance of notes, slides, or other collaborative documents.
  • The injected HTML could embed attacker-controlled resources, such as cross-origin iframes, which might be used to phish for sensitive information or deliver misleading content.
  • While the Content-Security-Policy limits direct JavaScript execution, the attacker could still manipulate the page to mislead users or redirect them to malicious sites.
  • If you rely on HedgeDoc for sensitive or confidential information, the vulnerability could undermine the integrity and trustworthiness of the content displayed.

To mitigate these risks, you should upgrade to HedgeDoc version 1.11.0 or later.

Compliance Impact

This vulnerability could impact compliance with common standards and regulations in the following ways:

  • GDPR (General Data Protection Regulation): If HedgeDoc is used to process or store personal data of EU citizens, the vulnerability could lead to unauthorized alteration or exposure of that data. Under GDPR, organizations must ensure the integrity and confidentiality of personal data. Failure to patch this vulnerability could be seen as a failure to implement appropriate technical measures, potentially resulting in non-compliance and fines.
  • HIPAA (Health Insurance Portability and Accountability Act): If HedgeDoc is used in a healthcare setting to handle protected health information (PHI), the vulnerability could compromise the integrity of that information. HIPAA requires covered entities to protect PHI from unauthorized alteration or disclosure. Exploiting this vulnerability could lead to a breach of PHI, resulting in non-compliance and potential penalties.
  • Other standards (e.g., ISO 27001, NIST): Many security standards require organizations to maintain the integrity and availability of information systems. This vulnerability could be seen as a failure to implement adequate security controls, potentially leading to non-compliance with such standards.

To maintain compliance, organizations should promptly apply the available patch (version 1.11.0 or later) and ensure that their use of HedgeDoc aligns with the security requirements of relevant regulations and standards.

Mitigation Strategies

To mitigate this vulnerability, follow these immediate steps:

  • Upgrade HedgeDoc: The most effective mitigation is to upgrade to HedgeDoc version 1.11.0 or later, where the vulnerability has been fixed. Follow the official upgrade guide provided by the HedgeDoc project.
  • Disable user registration temporarily: If upgrading is not immediately possible, disable new user registrations to prevent attackers from exploiting the vulnerability. This can usually be done via the application's configuration or by restricting access to the registration endpoint.
  • Audit existing user accounts: Review all registered user accounts for email addresses with suspicious local-parts (e.g., containing quotes, angle brackets, or other special characters). Disable or remove accounts that appear malicious.
  • Monitor and sanitize display names: If you cannot upgrade immediately, implement a temporary fix by sanitizing display names derived from email local-parts. Ensure that any special characters are properly escaped before rendering in HTML.
  • Enforce a strict Content-Security-Policy (CSP): While the deployed CSP may already mitigate some risks, ensure it is configured to block inline scripts and restrict resource loading to trusted domains. Example CSP header: Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-src 'none'; object-src 'none';
  • Restrict access to publish and slide views: Limit access to these views to trusted users only, reducing the potential impact of any injected HTML. This can be done via access controls or network-level restrictions.
  • Monitor for exploitation attempts: Set up logging and alerts for unusual activity, such as repeated access to publish/slide views or attempts to register suspicious email addresses.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-58487. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart