Executive brief
HedgeDoc is an open-source tool used for real-time collaborative note-taking. A security flaw in the GitHub Gist export feature could allow an attacker to steal a user's private notes. By tricking a logged-in user into clicking a malicious link, the attacker can force the application to export the victim's private content directly into a GitHub account controlled by the attacker.
Technical details
A Cross-Site Request Forgery (CSRF) vulnerability exists in the GitHub Gist export callback of HedgeDoc versions prior to 1.11.0. The application failed to validate the OAuth2 'state' parameter, only checking for its presence rather than verifying it against the user's session. An attacker can exploit this by generating a valid GitHub OAuth authorization code for their own account and crafting a malicious callback URL. If a logged-in victim visits this URL, the application uses the victim's session to identify the note to be exported but uses the attacker's authorization code to authenticate the destination GitHub account. This results in the victim's private notes being exported to the attacker's Gist. The vulnerability requires GitHub OAuth to be enabled and requires user interaction (clicking a link). It is fixed in version 1.11.0.
Affected products
- HedgeDoc HedgeDoc < 1.11.0
Timeline
- 2026-06-18: advisory: GitHub Security Advisory published by maintainers
- 2026-07-13: disclosed: CVE published to NVD