Gitea
CVE-2025-68946
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege Gitea account
-
DeliveryPost markdown link using javascript: scheme
-
ExploitVictim clicks crafted link
-
ExecutionScript executes in victim's session
-
ImpactSteal session or act as victim
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 | Exploitation requires an attacker who can submit user-controlled markdown that Gitea renders - e.g. issues, comments, pull request descriptions, wiki pages, or repository files - which in a typical configuration means an authenticated low-privilege account (consistent with PR:L); the attacker embeds a link whose URL uses a forbidden scheme (javascript:, and by extension vbscript:/data: per the fix). The flaw stems from Gitea's HTML sanitizer (bluemonday v1.0.24) not blocking these dangerous link schemes before version 1.20.1. Exploitation is LIMITED by required victim interaction (the target must click the malicious link, per UI:R) and by the need to post content a victim will view; it affects Gitea instances before 1.20.1 regardless of special configuration, so no non-default setting is required. |
| Impact | This is a moderate, not urgent, priority. The signals are internally consistent and point toward a limited-impact stored/reflected XSS rather than a widespread threat. CVSS 3.1 is 5.4 (Medium) with vector AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - network-reachable and low-complexity, but it requires an authenticated low-privilege account (PR:L) to inject the malicious markdown AND a victim to interact (UI:R) by clicking the crafted link, which substantially raises the real-world bar. EPSS is low at 0.25% (15th percentile), indicating a low modeled probability of exploitation in the near term, and the CVE is NOT listed in CISA KEV, so there is no confirmed active exploitation. There is no public exploit identified at time of analysis - the GitHub PR #25960 in the input is the vendor FIX (bumping bluemonday to v1.0.25 and explicitly blocking javascript:, vbscript:, and data: schemes), not weaponized exploit code, and should not be conflated with a POC. All signals align (medium severity, low EPSS, no KEV, no POC), so this is best treated as a routine patch-when-convenient item rather than an emergency. No SSVC decision data was provided in the input. |
| Exploit ScenarioDerived | An attacker with a low-privilege Gitea account (before 1.20.1) posts markdown content - for example in an issue, comment, pull request, or wiki/README - containing a link whose URL uses the javascript: scheme. When another user clicks that link in their browser, the script executes in the context of their authenticated Gitea session, enabling session/credential theft or actions on their behalf. No public exploit code was identified at time of analysis, and successful exploitation depends on the victim clicking the crafted link (UI:R). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Stored cross-site scripting in Gitea before 1.20.1 allows an attacker with a low-privilege account to embed links using forbidden URL schemes - notably javascript:, and by extension vbscript: and data: - in user-generated Markdown such as issues, comments, pull request descriptions, wiki pages, or repository files; when a victim clicks the crafted link, script executes in the context of the Gitea instance. The vulnerability carries a moderate CVSS of 5.4 (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) and requires victim interaction, with authentication requirements not confirmed as unauthenticated - the assessed vector (PR:L) indicates an authenticated, low-privilege attacker. No public exploit code or confirmed active exploitation was identified at time of analysis, and EPSS is low at 0.25% (15th percentile); a vendor fix is available in Gitea 1.20.1.
RemediationAI
Apply the vendor-released patch by upgrading Gitea to 1.20.1 or later, which incorporates the bluemonday v1.0.25 dependency bump and the sanitizer change that denies javascript, vbscript, and data URL schemes; the corresponding fix is tracked in https://github.com/go-gitea/gitea/pull/25960 and documented in the release notes at https://blog.gitea.com/release-of-1.20.1/ and https://github.com/go-gitea/gitea/releases/tag/v1.20.1. If an immediate upgrade is not possible, reduce exposure by limiting who can create issues, comments, pull request descriptions, wiki pages, and repository Markdown files to trusted users, and by requiring review or moderation of rendered content - accepting that this restricts collaboration workflows and does not eliminate the flaw for already-posted malicious links. Because exploitation depends on a victim clicking a crafted link (UI:R), enforcing a strict Content-Security-Policy that disallows inline and javascript: script sources provides defense-in-depth but may break legitimate instance functionality and requires careful testing; disabling Markdown link rendering entirely would remove the vector at the cost of degrading core Gitea usability. Note that these are compensating controls only, and the version bump remains the definitive fix.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gitea renders user-authored Markdown through an HTML sanitization pipeline built on the microcosm-cc/bluemonday library, which enforces a policy of permitted HTML elements and attributes. In versions prior to 1.20.1, Gitea shipped bluemonday v1.0.24 and its sanitizer policy permitted arbitrary URL schemes on anchor href attributes, so a link written as [text](javascript:...) survived sanitization intact. Because the scheme was never blocked, the resulting anchor tag preserved a script-executing URI, which is the classic CWE-79 (Improper Neutralization of Input During Web Page Generation / cross-site scripting) root cause. The upstream fix in PR 25960 bumps bluemonday to v1.0.25 and, in modules/markup/sanitizer.go, calls policy.AllowURLSchemeWithCustomPolicy for javascript, vbscript, and data with a callback that always returns false, effectively denying those three schemes while still allowing legitimate custom schemes such as cbthunderlink: and matrix:. Regression tests were added confirming that javascript:, vbscript:, and data: anchors render as stripped text. The CPE cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:* denotes the affected product across the pre-1.20.1 version range, and the sanitizer defect lives in the Markdown rendering path rather than in a network-facing service, which is consistent with the assessed AV:N/AC:L/PR:L/UI:R/S:C vector.
Know when Gitea 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
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Authenticated user must post markdown (PR:L) and victim must click the link (UI:R); script runs in the victim's browser beyond the app (S:C) with limited C/I impact and no availability impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
DescriptionCVE.org
In Gitea before 1.20.1, a forbidden URL scheme such as javascript: can be used for a link, aka XSS.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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
Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran
NVD
CVE.org
EPSS
GitHub
Exploit-DB