Skip to main content

Gitea CVE-2025-68946

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2025-12-26 cve@mitre.org
5.4
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

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

  1. Access
    Authenticate with low-privilege Gitea account
  2. Delivery
    Post markdown link using javascript: scheme
  3. Exploit
    Victim clicks crafted link
  4. Execution
    Script executes in victim's session
  5. Impact
    Steal 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).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

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

go code.gitea.io/gitea fix: 1.20.1

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

Vendor (mitre) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

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.

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:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

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

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Medium
popular self-hosted git service, common but not ubiquitous in enterprises
Data Quality
4 sources
Confidence: Medium

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.2%
Patch available Yes
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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
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:gitea:gitea:*:*:*:*:*:*:*:*

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

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

CVE-2026-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

Vendor StatusVendor

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