Skip to main content

Gitea EUVDEUVD-2026-41642

| CVE-2026-28737 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-06-17 https://github.com/go-gitea/gitea GHSA-9cpj-qc93-vw8v
8.7
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
Share

Severity by source

Vendor (https://github.com/go-gitea/gitea) PRIMARY
8.7 HIGH
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
vuln.today AI
8.7 HIGH

Network-reachable web UI (AV:N/AC:L); attacker needs a push-capable account, easily met by forking (PR:L); victim must open the preview (UI:R); XSS crosses into victim session (S:C) yielding full account takeover (C:H/I:H, A:N).

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE
HIGH
qualitative

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 18, 2026 - 01:36 vuln.today
Analysis Generated
Jun 18, 2026 - 01:36 vuln.today

DescriptionCVE.org

Summary

Me again.

Gitea's built-in 3D file viewer (powered by Online3DViewer) is vulnerable to stored cross-site scripting (XSS) through crafted .gltf files. When a glTF file declares an unsupported required extension, Online3DViewer generates an error message containing the extension name and Gitea inserts it into the DOM using innerHTML without sanitization. An attacker who can push a .gltf file to any repository can execute arbitrary JavaScript in the context of any user who views the file.

Affected Versions

  • Gitea 1.25.0 and later (3D file preview was introduced in 1.25 via the Online3DViewer integration)
  • Confirmed on gitea:1.25-nightly (SHA e33d1da...), which bundles online-3d-viewer npm package v0.16.0
  • The upstream Online3DViewer library is the root cause

Severity

  • Stored XSS: the payload persists in the repository and fires on every page view
  • Executes under the Gitea origin with the victim's session (cookies, CSRF tokens)
  • Any authenticated user viewing the file is compromised
  • Enables full account takeover (token creation, settings modification, repository manipulation)
  • No user interaction beyond viewing the file page is required

Details

Root Cause

When Online3DViewer parses a glTF file, it checks whether all extensionsRequired entries are supported. For unsupported extensions, it calls:

javascript
// In the Online3DViewer bundle (online-3d-viewer.js)
// Approximate offset 1142618 in the bundled chunk
this.SetError(yp("Unsupported extension: {0}.", unsupportedExtensions.join(", ")));

The SetError method stores this message, and Gitea's rendering code inserts it into the page using innerHTML:

javascript
// Gitea's error display handler
element.innerHTML = errorMessage;  // unsanitized

The extension names from extensionsRequired are taken directly from the JSON file with no escaping or sanitization, allowing HTML injection.

Attack Vector

  1. An attacker creates a .gltf file with a malicious extensionsRequired value:
json
{
  "asset": {"version": "2.0"},
  "buffers": [],
  "extensionsRequired": ["<img src=x onerror=\"alert(document.cookie)\">"],
  "scenes": []
}
  1. The attacker pushes this file to any Gitea repository they have write access to (including forks of public repositories).
  2. When any user navigates to the file's page in the Gitea web UI, the 3D viewer attempts to render it, encounters the "unsupported extension," and inserts the error message (containing the attacker's HTML) into the DOM via innerHTML.
  3. The injected <img onerror> handler executes arbitrary JavaScript under the Gitea origin with the victim's authenticated session.

Impact

From the XSS context, an attacker can:

  • Create API access tokens for the victim by POSTing to /user/settings/applications with the page's CSRF token
  • Read private repositories via same-origin API calls
  • Modify repository contents (supply chain attacks)
  • Escalate to admin if the victim is a Gitea administrator
  • Exfiltrate data via fetch, XMLHttpRequest, or navigator.sendBeacon

Proof of Concept

Minimal PoC (alert box)

Save as poc.gltf and push to any Gitea 1.25+ repository:

json
{
  "asset": {"version": "2.0"},
  "buffers": [],
  "extensionsRequired": ["<img src=x onerror=\"alert('XSS: '+document.domain)\">"],
  "scenes": []
}

Navigate to the file in the Gitea web UI. The alert will fire.

Suggested Fixes

Sanitize or text-encode the error message before DOM insertion. Replace innerHTML with textContent for error display:

javascript
// Instead of:
element.innerHTML = errorMessage;

// Use:
element.textContent = errorMessage;

Alternatively, escape HTML entities in the error message before insertion.

Additional hardening

  • Render 3D file previews inside a sandboxed <iframe> with sandbox="allow-scripts" and a restrictive CSP (default-src 'none'), similar to how Gitea already handles SVG attachments
  • Apply Content-Security-Policy headers to file preview pages that restrict inline script execution

AnalysisAI

Stored cross-site scripting in Gitea 1.25.x affects the built-in 3D file viewer (Online3DViewer integration) where a crafted .gltf file with an unsupported extension name in extensionsRequired is rendered into the DOM via innerHTML without sanitization. Any low-privileged user who can push a file to a repository (including a public fork) can compromise the session of any user who later views the file, enabling token theft and full account takeover. Publicly available exploit code exists (a working PoC is included in the GHSA-9cpj-qc93-vw8v advisory); no public exploit identified at time of analysis in CISA KEV.

Technical ContextAI

Gitea (pkg:go/code.gitea.io_gitea) introduced 3D model previews in 1.25 by bundling the Online3DViewer JavaScript library (npm package online-3d-viewer 0.16.0). When the library parses a glTF JSON document and finds an entry in extensionsRequired that it does not implement, it builds the message 'Unsupported extension: {names}' via SetError and Gitea's preview wrapper writes that string into the page using element.innerHTML. Because the extension names come straight from attacker-controlled JSON with no HTML escaping, this is a classic CWE-79 (Improper Neutralization of Input During Web Page Generation) sink - an HTML fragment supplied by the file flows directly into the live DOM of the Gitea origin.

RemediationAI

Vendor-released patch: upgrade Gitea to 1.26.0 or later, which is the fixed version called out in GHSA-9cpj-qc93-vw8v (https://github.com/go-gitea/gitea/security/advisories/GHSA-9cpj-qc93-vw8v). If you cannot upgrade immediately, disable the 3D file preview / Online3DViewer integration so .gltf, .glb and related model files fall back to raw download - this removes the sink at the cost of losing in-browser model rendering. As a defense-in-depth measure, serve repository preview pages with a strict Content-Security-Policy that forbids inline event handlers and inline script (default-src 'none' with explicit allowlists), and consider isolating model previews inside a sandboxed iframe (sandbox='allow-scripts' only) the same way Gitea already renders SVG attachments; this blunts the impact but does not fix the underlying innerHTML sink. Restricting who can push to public/fork repositories on the instance further reduces the attack surface but does not eliminate it because forking is normally a self-service feature.

More in Gitea

View all
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-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-2020-13246 HIGH POC
7.5 May 20

An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

CVE-2022-0905 HIGH POC
7.1 Mar 10

Missing Authorization in GitHub repository go-gitea/gitea prior to 1.16.4. Rated high severity (CVSS 7.1), this vulnerab

CVE-2022-1058 MEDIUM POC
6.1 Mar 24

Open Redirect on login in GitHub repository go-gitea/gitea prior to 1.16.5. Rated medium severity (CVSS 6.1), this vulne

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-27780 CRITICAL
9.8 Jul 03

Branch-protection bypass in Gitea's self-hosted Git server (all versions before 1.26.0) allows a user with push access t

CVE-2026-26292 CRITICAL
9.8 Jul 03

Migration transport protections in Gitea are bypassed for Git LFS operations, affecting all self-hosted instances before

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

Share

EUVD-2026-41642 vulnerability details – vuln.today

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