Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate and push image to registry
-
DeliveryUpload blob with text/html media type
-
ExploitLure authenticated victim to open blob URL
-
ExecutionScript executes on Gitea origin as victim
-
ImpactCreate API token and hijack account
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 (1) an account with permission to push container images to the Gitea container registry - so the registry feature must be in use and the attacker must hold push rights (the PR:L authentication barrier), and (2) a victim already authenticated to the same Gitea instance who is induced to open the attacker's blob URL directly in a browser (the UI:R interaction requirement). The flaw stems from serving blob downloads with a Content-Type copied from the pushed manifest's declared media type (e.g. text/html) with no Content-Disposition header and no restrictive Content-Security-Policy. Limiting factors: it is not reachable by fully unauthenticated attackers, it requires victim action on a specific URL rather than passive drive-by triggering, and instances that do not expose or use the container registry are unaffected. Fixed in Gitea v28.0.0, which serves blobs as application/octet-stream. |
| Impact | This is a moderate-severity stored cross-site scripting flaw (CWE-79) whose signals are internally consistent and point to a real-but-bounded risk rather than an urgent emergency. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N, base 5.4) describes an authenticated attacker (PR:L - any user able to push container images) who needs victim interaction (UI:R - a logged-in victim must open the malicious blob URL), with a scope change (S:C) because script executes on the trusted Gitea origin against a different security authority. All corroborating signals agree it is not widely exploited: EPSS is 0.18% (7th percentile, very low), CISA KEV does not list it (no active exploitation), and SSVC reports Exploitation:none, Automatable:no, Technical Impact:partial. The low Automatable rating fits an XSS requiring a user to be lured into opening a specific URL. No conflicting signals are present - CVSS, EPSS, and SSVC all converge on a low operational priority. The one practical caveat is impact amplification: although rated C:L/I:L, the description explicitly notes the payload can create API tokens as the victim, which could escalate to broader account compromise if a victim is an administrator; this makes the realistic worst case somewhat higher than the 5.4 score alone suggests. Overall this is a legitimate issue to patch on a normal cadence, not a drop-everything event. |
| Exploit ScenarioDerived | An attacker uses any account permitted to push container images and pushes a blob containing HTML/JavaScript with a text/html media type to the Gitea container registry. The attacker then sends another authenticated user a direct link to that blob; when the victim opens it in their browser, the script runs on the Gitea origin and can act as the victim, for example minting an API token for persistent access. No public exploit code was identified at time of analysis, and exploitation requires the victim to open the attacker-supplied URL. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Stored cross-site scripting in the Gitea container registry (versions through 1.27.3) lets any user with permission to push container images publish a blob whose manifest declares a text/html media type, which Gitea then serves back verbatim as the blob's Content-Type with no Content-Disposition header and no restrictive Content-Security-Policy - so the embedded JavaScript executes on the Gitea origin when an authenticated victim opens the blob URL. Impact is bounded but real: the attacker must already hold registry push rights and the victim must be induced to open the crafted URL directly, but success allows same-origin actions as the victim such as creating API tokens. The flaw is rated 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N), carries EPSS 0.18% (7th percentile), shows CISA SSVC exploitation of 'none', and has no public exploit identified at time of analysis; exploitation requires an account with image-push permission (authenticated, PR:L) and victim interaction (UI:R).
RemediationAI
Upgrade to Gitea v28.0.0 or later, which is the vendor-released fix: the patched code serves registry blobs as application/octet-stream instead of trusting the manifest-declared media type, and validates manifest media types before using them as Content-Type (see https://github.com/go-gitea/gitea/releases/tag/v28.0.0, release notes at https://blog.gitea.com/release-of-28.0.0/, patch at https://github.com/go-gitea/gitea/pull/39398, advisory at https://github.com/go-gitea/gitea/security/advisories/GHSA-7cq7-4v93-8wjm). If an immediate upgrade is not possible, the most effective compensating control is to disable the container/package registry feature where it is not required, which removes the vulnerable endpoints entirely but forfeits all container image hosting; if the registry must stay online, tighten push permissions so only trusted maintainers can publish images, since the attacker precondition is registry push rights, though this only narrows the set of potential attackers rather than eliminating the flaw. As a defense-in-depth measure, place a reverse proxy or WAF rule in front of the /v2/*/blobs/* paths that adds Content-Disposition: attachment and X-Content-Type-Options: nosniff and enforces a restrictive Content-Security-Policy, which blocks in-browser execution of served HTML; the trade-off is configuration complexity and the risk that legitimate registry clients which read blob response headers could misbehave. Also treat any instance that ran a vulnerable version as potentially compromised at the token level, and review or rotate personal access tokens created around suspicious registry activity, since the demonstrated post-exploitation action is token creation as the victim.
Affected VersionsENISA
Affected Packages
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 root cause is a MIME/Content-Type confusion issue in the OCI/Docker container registry endpoints of Gitea, classified as CWE-79 (Improper Neutralization of Input During Web Page Generation, i.e. cross-site scripting). Gitea's registry implementation stored each pushed blob alongside a media type taken from the image manifest supplied by the pusher, and the blob download handler ("/v2/<name>/blobs/<digest>") echoed that stored media type back into the HTTP Content-Type response header. Because blobs are user-controlled content and the media type was never validated against a whitelist, a pusher could declare text/html and have the registry deliver attacker-authored HTML/JavaScript on the Gitea web origin. Browser response handling then rendered that content in the site's origin context, since no Content-Disposition (which would force download) and no restrictive Content-Security-Policy were applied to prevent active content from executing. The upstream fix in PR 39398 reworks the header helpers (setResponseHeaders to writeResponseHeaders) and, decisively, stops trusting caller-supplied media types for blob responses - blobs are now always served as application/octet-stream, and manifest responses only use a media type after validation through IsMediaTypeValid, falling back to application/octet-stream otherwise. This is a stored XSS through a legitimate file-upload/download channel rather than a reflected injection in a web form, and it only manifests on instances that actually expose the container/packages registry.
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
Network-reachable registry with low-complexity push; PR:L because pushing images requires an authenticated account; UI:R as the victim must open the blob URL; S:C and C:L/I:L for XSS acting as the victim on the Gitea origin, no availability impact.
Primary rating from Vendor (88ee5874-cf24-4952-aea0-31affedb7ff2).
CVSS VectorVendor: 88ee5874-cf24-4952-aea0-31affedb7ff2
Lifecycle Timeline
2DescriptionCVE.org
Gitea's container registry served blob downloads with a Content-Type taken from the media type declared in pushed image manifests, without a Content-Disposition or restrictive content security policy. A user who can push container images can publish a blob containing HTML and JavaScript with a text/html media type. When a victim who is authenticated to the instance opens the blob URL in a browser, the script runs on the Gitea origin and can perform actions as the victim, such as creating API tokens.
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.
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
EUVD-2026-93910
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB