Skip to main content

Gitea CVE-2025-68942

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 to Gitea instance
  2. Delivery
    Enter script payload in branch/tag search box
  3. Exploit
    v-html renders searchTerm unsanitized
  4. Execution
    Victim views create-tag/branch prompt
  5. Impact
    Script 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.

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

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

go code.gitea.io/gitea fix: 1.22.2

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

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 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.

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:L/SI:L/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

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

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Medium
popular self-hosted git forge, common but not universally deployed
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