CVE-2026-96594: Gitea repository media API stored XSS

Published Oct 6, 2026
·
Updated

The Gitea API endpoint GET /api/v1/repos/{owner}/{repo}/media/{filepath} wrote files of up to 1 KiB that are stored directly in Git, not in LFS, to the response without the content type and disposition headers Gitea uses for user content. An HTML file committed to a repository was therefore rendered by the browser on the Gitea origin. A user who can push to a repository could run JavaScript in the session of a victim who opens the media URL and act with the victim's permissions.

Affected Software

1 affected component
Gitea Gitea

Event History

Oct 6, 2026
CVE Published
via MITRE·09:36 PM
Data Sourced
via MITRE·09:36 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An attacker needs permission to push an HTML file to a repository. The file must be no larger than 1 KiB and stored directly in Git rather than in LFS.

2

What user interaction is required?

A victim must open the repository media API URL for the attacker-controlled HTML file. The browser then renders the file on the Gitea origin, allowing its JavaScript to run in the victim's session.

3

What could an attacker do after successful exploitation?

The attacker-controlled JavaScript can act with the permissions of the victim whose session opened the media URL.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203