CVE-2026-103667

Gitea container registry stored XSS through blob media type

Published Oct 6, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability arises when Gitea’s container registry serves blob downloads using a Content‑Type directly from the image manifest, without a Content‑Disposition header or a restrictive Content‑Security‑Policy. A user who is able to push container images can store a blob that contains HTML and JavaScript and label it with a text/html media type. When an authenticated victim opens that blob URL in a browser, the injected script executes in the victim’s browser context on the Gitea origin, enabling the attacker to perform actions as the victim, such as generating API tokens. The primary consequence is the loss of confidentiality and integrity of user credentials and authorization tokens.

Affected Systems

All Gitea installations that are running any version prior to 28.0.0 are vulnerable, as the patch was released with the 28.0.0 update. The issue is specific to instances that host a container registry and allow users to push images.

Risk and Exploitability

The exploit requires an attacker to have the ability to push images to the target Gitea instance. Once this permission is granted, the attacker can compose a malicious image manifest and blob, and the compromise is immediate when a victim visits the blob URL. The EPSS score is < 1%, and the vulnerability is not listed in the CISA KEV catalog, but the CVSS score is 5.4. Given the straightforward attack flow and the high impact of token theft, the risk level warrants urgent remediation. The attack vector is therefore likely an internal or compromised account with image‑push privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 28.0.0 or later, which removes the vulnerable handling of blob MIME types.
  • If possible, restrict or disable the ability to push container images for untrusted users, limiting the attack surface.
  • Configure a restrictive Content‑Security‑Policy or add a Content‑Disposition header to blob downloads to prevent execution of embedded HTML or script content.

Generated by OpenCVE AI on October 7, 2026 at 22:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Description 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.
Title Gitea container registry stored XSS through blob media type
Weaknesses CWE-79
References
Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Oct 7, 2026, 8:17 PM
Reserved
Oct 4, 2026, 9:57 PM
Status
Analyzed
Published
Oct 6, 2026, 8:17 PM
Modified
Oct 15, 2026, 2:25 AM