Skip to main content

Gitea CVE-2026-96594

| EUVDEUVD-2026-94066 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-06 88ee5874-cf24-4952-aea0-31affedb7ff2
6.1
CVSS 3.1 · Vendor: 88ee5874-cf24-4952-aea0-31affedb7ff2
View

Attack ChainAIDerived

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

  1. Access
    Obtain push access to a repository
  2. Delivery
    Commit malicious HTML under 1 KiB (non-LFS)
  3. Exploit
    Send media URL to victim
  4. Execution
    Victim's browser renders and executes JavaScript
  5. Impact
    Act with victim's Gitea session permissions

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 attacker with push/write access to a repository on the target Gitea instance (≤28.0.0). The malicious file must be HTML, committed directly into Git (NOT Git LFS), and at most 1 KiB - this is the specific raw/media serving path (GetRawFileOrLFS) that omitted content-type and content-disposition headers. Exploitation is limited by mandatory victim interaction (the victim must open the media URL in their authenticated session, per UI:R) and by the need for pre-existing push access; instances that restrict repository write access or disallow untrusted contributors sharply reduce exposure. Fixed in v28.1.0.

Impact

This is a stored/DOM XSS (CWE-79) in Gitea's raw media API endpoint, rated CVSS 6.1 (medium). Low-priority exploitation signals dominate: EPSS is 0.17% (6th percentile), the CVE is NOT in CISA KEV, SSVC marks Exploitation as 'none' and Automatable 'no' with only 'partial' Technical Impact, and no public exploit was identified. There is a notable conflict between the official CVSS vector and the described preconditions: the vector asserts PR:N (unauthenticated), but the description explicitly states 'a user who can push to a repository' is required - committing an HTML file inherently needs write/push access, so the official PR:N appears to understate the privilege requirement; verify with vendor. The scope change (S:C) and UI:R are consistent with XSS running on the Gitea origin and requiring a victim to open a crafted media URL. Realistically this is a genuine but lower-tier issue: it needs both attacker push access and victim interaction, confining it to targeted abuse (e.g., multi-user instances with open registration or shared repos) rather than mass automated exploitation.

Exploit ScenarioDerived

An attacker with push access to a repository on a shared Gitea instance commits a small (<1 KiB) HTML file stored directly in Git (not LFS), then lures a victim into opening its media URL (GET /api/v1/repos/{owner}/{repo}/media/{filepath}). Because the endpoint served the file without content-type/disposition headers, the victim's browser renders it on the Gitea origin and executes attacker JavaScript in the victim's authenticated session. No public exploit code was identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 07, 2026

Stored cross-site scripting in Gitea's raw media API endpoint (GET /api/v1/repos/{owner}/{repo}/media/{filepath}) lets an authenticated user with push access to a repository have HTML files of up to 1 KiB rendered by the browser on the Gitea origin, executing JavaScript in the session of any victim who opens the media URL and acting with that victim's permissions. The flaw affects Gitea versions up to and including 28.0.0 and arises because the handler in routers/api/v1/repo/file.go wrote non-LFS file content directly to the HTTP response without the content-type and content-disposition headers Gitea normally applies to user-supplied content. Exploitation requires prior repository write access and mandatory victim interaction (the target must open the crafted media URL while authenticated), and a vendor fix is available in Gitea 28.1.0. EPSS is low at 0.17% (6th percentile), CISA SSVC records no observed exploitation and no automatable exploitation path, and no public exploit code was identified at time of analysis.

RemediationAI

Upgrade to Gitea 28.1.0 or later, the vendor-released patch that routes media responses through the ServeUserContent helpers and restores the correct Content-Type and Content-Disposition headers (see https://blog.gitea.com/release-of-28.1.0/, https://github.com/go-gitea/gitea/releases/tag/v28.1.0, and advisory https://github.com/go-gitea/gitea/security/advisories/GHSA-94rx-fqm6-q23v). If immediate upgrading is not possible, the most effective compensating control is to restrict repository write/push access to trusted contributors and disallow untrusted or untrusted-fork contributions, since exploitation requires an account that can commit the malicious HTML file; the trade-off is reduced collaboration and, on public instances, the need to review or gate external contributors. As a secondary mitigation, a reverse proxy can be configured to add 'Content-Disposition: attachment' and 'X-Content-Type-Options: nosniff' to responses under /api/v1/repos/*/media/* (and equivalent raw-content paths); this neutralizes in-browser rendering of committed HTML but has the side effect of breaking legitimate inline viewing of images and other media served through those endpoints. Disabling or blocking the media endpoint entirely is not recommended because it breaks normal API functionality. Note that EPSS is low (0.17%, 6th percentile) and CISA SSVC records no observed exploitation, so remediation can be prioritized alongside other medium-severity issues rather than as an emergency, while still tracking the 28.1.0 upgrade.

Affected VersionsENISA

Gitea 0 ≤28.0.0

Affected Packages

euvd gitea no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a classic cross-site scripting weakness (CWE-79) rooted in incorrect output handling rather than a parsing or memory-safety bug. Gitea's API handler GetRawFileOrLFS in routers/api/v1/repo/file.go serves raw repository content and detects Git LFS pointer files; for small blobs stored directly in Git rather than LFS, the handler previously used ctx.Resp.Write() to emit the bytes, bypassing the httplib.ServeUserContentByFile / ServeUserContentByReader helpers that attach Content-Type and Content-Disposition headers. Without those headers, and with a file at or below the 1 KiB inline threshold, a browser receiving an HTML blob will sniff and render it as a document in the security context of the Gitea origin. Because the injected script executes under the Gitea origin, the CVSS vector's Scope:Changed (S:C) and Low Confidentiality/Integrity impacts are appropriate, while no Availability impact is expected. The upstream fix replaces the raw writes with httplib.ServeUserContentByReader(..., httplib.ServeHeaderOptions{Filename: blob.Name()}) and mirrors the same change for the LFS data path so that all served content receives Gitea's standard user-content headers. Note that the vulnerable NVD vector (PR:N) and the authoritative assessed vector (PR:L) differ: the assessed vector correctly reflects that exploiting this endpoint requires an attacker already holding repository push privileges.

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 (88ee5874-cf24-4952-aea0-31affedb7ff2) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

Committing HTML needs push access, so PR:L (not NVD's PR:N); victim must open the URL (UI:R); script runs on Gitea origin into the victim session (S:C) with limited C/I, no A.

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

Primary rating from Vendor (88ee5874-cf24-4952-aea0-31affedb7ff2).

CVSS VectorVendor: 88ee5874-cf24-4952-aea0-31affedb7ff2

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

Lifecycle Timeline

2
CVSS changed
Oct 07, 2026 - 16:22 NVD
6.1 (None) 6.1 (MEDIUM)
CVE Published
Oct 06, 2026 - 22:17 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

The Gitea API endpoint GET /api/v1/repos/{owner}/{repo}/media/{filepath} wrote files of up to 1 KiB that are stored directly in Git, not in LFS, to the response without the content type and disposition headers Gitea uses for user content. An HTML file committed to a repository was therefore rendered by the browser on the Gitea origin. A user who can push to a repository could run JavaScript in the session of a victim who opens the media URL and act with the victim's permissions.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular self-hosted Git service, common in dev environments, not ubiquitous
Data Quality
7 sources
Confidence: High

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 No
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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
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.

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

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