Skip to main content

HedgeDoc CVE-2026-58489

MEDIUM
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-07-13 GitHub_M
6.8
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker obtains own GitHub OAuth code
  2. Delivery
    Craft forged HedgeDoc callback URL with attacker code
  3. Exploit
    Deliver crafted link to logged-in victim
  4. Execution
    Victim clicks link, HedgeDoc validates victim session
  5. Persist
    HedgeDoc exchanges attacker code for attacker GitHub token
  6. Impact
    Victim's note exported to attacker's Gist

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

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

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target HedgeDoc instance must have GitHub OAuth integration configured with valid clientID and clientSecret, enabling the Gist export feature; (2) the victim must be actively authenticated to HedgeDoc at the time of the attack; and (3) the victim must click a specifically crafted callback URL delivered by the attacker. Limiting factors include: the attacker must possess a valid GitHub OAuth authorization code of their own to inject into the forged callback, requiring the attacker to also have a GitHub account; user interaction is mandatory and cannot be automated or performed without victim action; and the attack window is constrained to users with active HedgeDoc sessions. Exploitation is not possible against instances with GitHub integration disabled, unauthenticated users, or users who do not interact with the crafted link.

Impact

The CVSS 4.0 score of 6.8 reflects meaningful real-world risk constrained by exploitation complexity. The AV:N/UI:A combination means the attacker must operate over the network and requires active victim interaction, limiting the window for mass exploitation. AC:H and AT:P signal that the attacker must first obtain a valid GitHub OAuth code of their own and precisely craft the forged callback URL - non-trivial preconditions. The confidentiality impact is high for both victim (VC:H) and subsequent system (SC:H), since private or protected notes can be silently exfiltrated to an attacker-controlled Gist, which may subsequently be public. There is no integrity or availability impact. EPSS data is not provided, and there is no KEV listing or public POC, suggesting this is not currently being mass-exploited. The realistic risk is targeted exfiltration of sensitive notes from specific users rather than broad opportunistic attacks. The requirement for the victim to be authenticated to HedgeDoc and to click a crafted link reduces the attack surface but does not eliminate risk in collaborative environments where note links are routinely shared.

Exploit ScenarioDerived

An attacker authenticates to their own GitHub account and initiates an OAuth authorization flow to obtain a valid GitHub authorization code. They then construct a forged HedgeDoc Gist export callback URL - pointing to /auth/github/callback/<victim-note-id>/gist - embedding their own valid code and any arbitrary state string. When a logged-in HedgeDoc user clicks the crafted link (delivered via phishing, a shared document, or embedded in a note), HedgeDoc's callback handler uses the victim's active session to resolve the target note but uses the attacker's authorization code to acquire a GitHub access token, causing the note's content to be posted as a Gist under the attacker's GitHub account.

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

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

Alert me

AnalysisAIv1 – Jul 13, 2026

HedgeDoc's GitHub Gist export feature exposes private and protected note content to attacker-controlled GitHub accounts via OAuth2 state parameter forgery. Versions prior to 1.11.0 generated an OAuth2 state token during the Gist export flow but validated only its presence - not its binding to the initiating user session - enabling a cross-site request forgery attack. An attacker who tricks a logged-in victim into clicking a crafted callback URL can redirect the victim's note export to the attacker's own GitHub Gist, bypassing any note visibility controls. No public exploit code or CISA KEV listing is identified at time of analysis, but a confirmed patch exists in version 1.11.0.

RemediationAI

Upgrade HedgeDoc to version 1.11.0, which introduces proper session-bound OAuth2 state validation in the Gist export callback handler (commit fbd7307f162754212046ec343cbe691223a48c8d). The fix stores the generated state in the user session and enforces an exact match on callback, with immediate deletion to prevent replay. If an immediate upgrade is not possible, the most effective compensating control is to disable the GitHub integration entirely by removing the GitHub clientID and clientSecret from the HedgeDoc configuration, which removes the vulnerable code path; the trade-off is loss of Gist export functionality for all users. Restricting network access to the HedgeDoc instance to trusted users reduces the social engineering surface but does not eliminate the vulnerability since the attack is user-driven. Vendor advisory and fix reference: https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-8v9p-5j95-826j and https://github.com/hedgedoc/hedgedoc/commit/fbd7307f162754212046ec343cbe691223a48c8d.

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 is an open-source Node.js collaborative markdown application (CPE: cpe:2.3:a:hedgedoc:hedgedoc:*:*:*:*:*:*:*:*). The affected code path is in lib/response.js and lib/web/note/actions.js, which together implement GitHub OAuth2 for the Gist export feature. The vulnerability is classified as CWE-352 (Cross-Site Request Forgery): the OAuth2 state parameter is meant to be a cryptographically random, session-bound nonce that ties the authorization request to the initiating session, preventing callback URL injection. The pre-1.11.0 code checked if (!code || !state) - verifying only that the state field was non-empty - without comparing it against the session-stored value (req.session.githubGistState). The fix (commit fbd7307f) explicitly reads sessionsState from the session, deletes it to prevent replay, and gates further processing on sessionsState !== state failing. This is a textbook OAuth2 CSRF mitigation pattern.

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 6.8 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

Attacker needs no privileges; victim must click crafted link (UI:R); scope changes as note content crosses to attacker's GitHub Gist (S:C); AC:H reflects need for attacker's own valid OAuth code.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

DescriptionCVE.org

HedgeDoc is an open source, real-time collaborative markdown notes application. Prior to 1.11.0, the GitHub Gist export flow created an OAuth2  state  value but only checked that it was present rather than validating it against the value expected for the user's session. Because the state was not properly validated, an attacker could forge a callback URL containing their own valid GitHub OAuth code. When processing the callback, HedgeDoc used the victim's logged-in session to select which note to export, but the attacker's authorization code to determine which GitHub account received it. As a result, a logged-in victim who clicked a crafted link could export their own private, protected, or limited note directly into a Gist controlled by the attacker. This issue has been fixed in version 1.11.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
self-hosted open source notes app, niche enterprise footprint
Data Quality
4 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.1%
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

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

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

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-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

CVE-2021-29503 MEDIUM
6.1 May 19

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