Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCreate account and fork target repo
-
DeliveryCommit crafted .gltf with HTML in extensionsRequired
-
ExploitLure victim to file preview URL
-
InstallOnline3DViewer raises 'Unsupported extension' error
-
C2Gitea writes attacker HTML via innerHTML
-
ExecutePayload runs in victim's Gitea origin
-
ImpactMint API token and take over 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 | Target instance must be running Gitea 1.25.0 through 1.25.x with the default Online3DViewer-backed 3D file preview enabled. The attacker needs an account with write access to any repository on that instance, which on typical deployments is satisfied by the ability to fork a public repository and push a single .gltf file. The vulnerability fires only when a victim with an authenticated session navigates to the file's preview page in the web UI (UI:R), so it depends on user interaction such as a link in a PR, issue, or notification; it does not trigger on raw download, on git clone, or for users who only browse the repository tree without opening the .gltf. Gitea versions below 1.25.0 do not ship the 3D viewer and are not exploitable via this path. |
| Impact | The vendor CVSS 3.1 vector AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N (8.7 High) is well-aligned with the facts: exploitation is over the network, requires only an account that can push a file (PR:L - satisfied by forking any public repo), needs a victim to load the file page (UI:R), and crosses scope into the victim's browser/session (S:C) producing high confidentiality and integrity impact. EPSS and KEV data were not supplied, but the threat is realistic because the PoC in the GHSA is trivially weaponizable and persists on every view. The main limiting factor is the requirement for a victim to actually navigate to the .gltf preview page; without that interaction the payload does not fire, which is why availability is N. Treat this as a real near-term priority for any 1.25.x deployment that hosts untrusted users or public forks. |
| Exploit ScenarioDerived | An attacker registers (or uses an existing low-privilege account), forks any public repository on the target Gitea 1.25.x instance, and commits a poc.gltf whose extensionsRequired array contains '<img src=x onerror="...">'. They then send a maintainer or admin a link to the file (for example as part of a pull request review) and when the victim opens the preview page the 3D viewer reports the unsupported extension, Gitea writes the attacker's HTML into the DOM, and the onerror handler runs in the Gitea origin to mint an API token via /user/settings/applications, exfiltrate it, and take over the account. A working PoC payload is published in GHSA-9cpj-qc93-vw8v. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 18, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
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:H/I:H/A:N
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).
Primary rating from Vendor (https://github.com/go-gitea/gitea).
CVSS VectorVendor: https://github.com/go-gitea/gitea
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(SHAe33d1da...), which bundlesonline-3d-viewernpm 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:
// 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:
// Gitea's error display handler
element.innerHTML = errorMessage; // unsanitizedThe extension names from extensionsRequired are taken directly from the JSON file with no escaping or sanitization, allowing HTML injection.
Attack Vector
- An attacker creates a
.gltffile with a maliciousextensionsRequiredvalue:
{
"asset": {"version": "2.0"},
"buffers": [],
"extensionsRequired": ["<img src=x onerror=\"alert(document.cookie)\">"],
"scenes": []
}- The attacker pushes this file to any Gitea repository they have write access to (including forks of public repositories).
- 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. - 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/applicationswith 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, ornavigator.sendBeacon
Proof of Concept
Minimal PoC (alert box)
Save as poc.gltf and push to any Gitea 1.25+ repository:
{
"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:
// 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>withsandbox="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
Articles & Coverage 1
Executive ViewAI
Gitea 1.25.x contains a stored cross-site scripting vulnerability in the 3D file viewer that enables low-privileged users to compromise the sessions and accounts of any other user viewing a malicious file, facilitating token theft and full account takeover. This exposes organizations running affected versions to credential compromise and unauthorized access to repositories and sensitive code.
Disable Online3DViewer (3D file viewer) in Gitea settings to block .gltf file rendering; restrict repository push permissions to eliminate low-privileged upload capability; implement Content Security Policy headers with strict DOM manipulation controls; monitor and block .gltf file uploads until patched version available; consider read-only mode for affected repositories during remediation.
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.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
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
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor 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 |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-41642
GHSA-9cpj-qc93-vw8v
NVD
CVE.org
EPSS
Exploit-DB