MonicaHQ 4.0.4 - Client Side Template Injection
8
High
Discovered by
Offensive Team, Fluid Attacks
Summary
Full name
MonicaHQ 4.0.4 - Client Side Template Injection
Code name
State
Public
Release date
17 abr 2023
Affected product
MonicaHQ
Affected version(s)
4.0.0
Vulnerability name
Client Side Template Injection
Vulnerability type
Remotely exploitable
Yes
CVSS v3.1 vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CVSS v3.1 base score
8.0
Exploit available
No
Description
MonicaHQ version 4.0.0 allows an authenticated remote attacker to execute malicious code in the application. This is possible because the application does not correctly validate the data entered by the user.
Vulnerability
This vulnerability occurs because the application does not correctly validate the data entered by users when creating new contacts within the application, as well as the characteristics of the contacts themselves.
Exploitation
First we create a contact:

After creating the contact you can edit its characteristics. At this point there are many inputs which are vulnerable. The PoC of the exploitation of one of them will be shown but it applies to all the others. In this case we edit the food preference feature. We inject the following payload which interprets:
At this point we can say that it is vulnerable to CSTI since we see the value 49 reflected.


Thanks to this it is possible to inject JavaScript code, which is interpreted.


As the XSS is stored, CSRF can be applied to change another user's email address or delete their account.
Evidence of exploitation
CSTI to CSRF Change mail

CSTI to CSRF Delete Account

Our security policy
We have reserved the CVE-2023-1031, CVE-2023-1094, CVE-2023-30787, CVE-2023-30788, CVE-2023-30789, CVE-2023-30790 to refer to this issue from now on. Disclosure policy
System Information
Version: MonicaHQ 4.0.0
Operating System: GNU/Linux
Mitigation
There is currently no patch available for this vulnerability.
References
Vendor page https://github.com/monicahq/monica
Release page https://github.com/monicahq/monica/releases/tag/v4.0.0
Timeline
IA generativa
30 mar 2023
Vendor Confirmed Vuln.
17 abr 2023
Vendor contacted
30 mar 2023
Public disclosure
17 abr 2023