Gitea 1.7.3 stored HTML injection (XSS)
#######################################
Information
===========
Name: Gitea 1.7.0 - 1.7.3 stored HTML injection
Software: Gitea - a self-hosted Git service
Homepage: https://gitea.io/
Vulnerability: stored HTML injection
Affected: 1.7.0 - 1.7.3
Tested: 1.7.2, 1.7.3
Fixed: 1.7.4
Prerequisites: edit repository settings
Severity: low
CVE: NA
Credit: Anti RA$?is
HTML version: https://bitflipper.eu/
Description
===========
Gitea is a self hosted git repository service, which is affected by stored
HTML injection vulnerability, allowing authenticated user to inject payload
into repository's description field. It is executed, when victim navigates
to malicious repository's code page.
Proof of Concept
================
Attacker needs to create a new public repository and set the description
containing payload.
==================== source start ========================
document.querySelector('#xss').parentNode.innerHTML='\x3cmarquee
style=color:red\x3eXSS\x3c/marquee\x3e';alert('XSS')
==================== source end ========================
Code is executed, when victim navigates to malicious repository's code page.
Following HTML snippet demonstrates the issue:
==================== source start ========================