Gitea
CVE-2025-68942
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Gitea instance
-
DeliveryEnter script payload in branch/tag search box
-
Exploitv-html renders searchTerm unsanitized
-
ExecutionVictim views create-tag/branch prompt
-
ImpactScript executes in victim's browser session
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 | Requires an authenticated Gitea user (PR:L) with access to a repository's branch/tag creation UI, running a vulnerable instance (before 1.22.2); the attacker supplies a malicious search term that is rendered via v-html in the RepoBranchTagSelector.vue 'create tag'/'create branch' hint. Exploitation is LIMITED by three factors: valid authentication is needed, a victim must view/interact with the reflected prompt (UI:R), and only instances older than 1.22.2 are affected - patched or newer deployments are not vulnerable. |
| Impact | This is a genuine but moderate-severity stored/DOM XSS (CWE-79), best characterized as a real-but-not-urgent issue rather than a top priority. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N, base 5.4 Medium) tells a consistent story: network-reachable, low complexity, but requiring an authenticated account (PR:L) AND victim interaction (UI:R), with only Low confidentiality/integrity impact. The scope change (S:C) is justified because injected script executes in another user's browser context. All exploitation signals point the same direction with no contradictions: EPSS is low at 0.25% (15th percentile), the CVE is NOT in CISA KEV, and there is no public exploit code - only the vendor patch diff is available, which is not an attack POC. The low EPSS is fully consistent with the unexploited, interaction-and-authentication-gated nature of the flaw. Net: a legitimate vulnerability worth patching in normal cycles, but the authentication requirement, mandatory user interaction, and absence of any exploitation evidence place it well below critical-priority emergencies. |
| Exploit ScenarioDerived | An authenticated user with repository access enters a crafted search term containing an HTML/script payload into the branch/tag creation search box; because the 'create tag/branch' hint is rendered with v-html instead of v-text, the payload is injected into the DOM unsanitized. When the term is reflected in the rendered prompt, the attacker's script executes in the browser session, enabling session-context actions. No public exploit code exists, though the vendor patch diff clearly discloses the vulnerable sink. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Authenticated cross-site scripting (XSS) in Gitea before 1.22.2 allows a user with repository branch/tag creation access to inject HTML through a crafted search term that is rendered with v-html in the RepoBranchTagSelector component; a victim must view or interact with the resulting prompt (UI:R). The issue is a moderate-severity CWE-79 flaw confirmed by an upstream patch, with EPSS 0.25% (15th percentile) and no public exploit identified at time of analysis, so it is a genuine but not urgent risk.
RemediationAI
Vendor-released patch: 1.22.2. Upgrade to Gitea 1.22.2 or later, which contains the upstream fix that replaces v-html with v-text in RepoBranchTagSelector.vue; patch details are in PR 31966 and release notes at https://blog.gitea.com/release-of-1.22.2/ and https://github.com/go-gitea/gitea/releases/tag/v1.22.2. If immediate upgrade is not possible, restrict branch/tag creation permissions to trusted authenticated users because exploitation requires PR:L and victim UI interaction, accepting that this may disrupt normal contributor workflows; additionally consider a Content-Security-Policy that blocks inline script execution to reduce XSS impact, but test for breakage in Gitea's UI. No vendor-released patch alternative or exact workaround version is identified beyond upgrading to 1.22.2.
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
Root cause is improper neutralization of user input during page generation (CWE-79) in Gitea's Vue-based web UI. The RepoBranchTagSelector.vue component previously bound the create-tag and create-branch hint strings with v-html after substituting the searchTerm placeholder; v-html renders the term as raw HTML instead of escaped text. The patch, tracked as PR 31966 and released in 1.22.2, switches those bindings to v-text, which escapes the search term. CPE cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:* tracks the affected Gitea product family; exploitation requires authentication and victim interaction per the CVSS vector PR:L/UI:R.
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 repo access is required (PR:L) and a victim must view the reflected prompt (UI:R); injected script runs in the victim's browser context, changing scope (S:C) with limited C/I impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
DescriptionCVE.org
Gitea before 1.22.2 allows XSS because the search input box (for creating tags and branches) is v-html instead of v-text.
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