Cross-site scripting in Gitea - CVE-2026-103667

 

Cross-site scripting in Gitea - CVE-2026-103667

Published: October 19, 2026


Vulnerability identifier: #VU156103
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2026-103667
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote user to execute arbitrary JavaScript on the Gitea origin and take over victim accounts, potentially gaining control of the entire instance if a site administrator is compromised.

The vulnerability exists due to improper validation of layer and config mediaType values in the Gitea container registry when processing image manifests and serving stored blobs with an attacker-controlled Content-Type. A remote user can publish a blob containing HTML and JavaScript with mediaType set to text/html and lure a victim into opening its URL and authenticating when prompted to execute the script on the Gitea origin, bypass same-origin request protections, and create a persistent, all-scope API token through /user/settings/applications.


Affected software

Gitea

How to mitigate CVE-2026-103667

Install security update from vendor's website.

Gitea - update to 28.0.0

External References

Related Security Bulletins