Document Title: =============== Kimai v1.13 - (textarea) Cross Site Scripting Vulnerability Date: ===== 2021-06-22 References: =========== https://www.vulnerability-lab.com/get_content.php?id=2269 VL-ID: ===== 2269 Common Vulnerability Scoring System: ==================================== 4 Vulnerability Class: ==================== Cross Site Scripting - Non Persistent 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: ========= 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) Report-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) Status: ======== Published Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== 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: ================= 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: "> --- 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] (:1:765266) at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:405040) at HTMLInputElement. (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. (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 () at new t (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401801) at n. (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 (:1:919027) at Object.plRon (:1:924704) at Object.apply (:1:941551) at new n (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:409239) at HTMLInputElement. (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. (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 () at new t (https://kimai-trackingapp.localhost:8080/build/app.19a715ed.js:1:401801) at n. (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: ========= The vulnerability can be patched by an encode to sanitize in the textarea.value using jQuery.prepend. Risk: ===== The security risk of the client-side cross site scripting vulnerability in the web-application is estimated as medium. Credits: ======== Vulnerability-Lab [Research Team] - https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab Disclaimer: =========== 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]™