A Host Header Poisoning vulnerability exists in Monica 4.1.2 due to improper handling of the HTTP Host header in app/Providers/AppServiceProvider.php, combined with the default misconfiguration where the "app.force_url" is not set and default is "false". The application generates absolute URLs (such as those used in password reset emails) using the user-supplied Host header. This allows remote attackers to poison the password reset link sent to a victim,
The Monica application generates absolute URLs (e.g., for password reset) based on the value of the HTTP Host header provided by the user, instead of using a hardcoded base address. The default configuration leaves the 'app.force_url' parameter unset (value 'false'), so the protection mechanism is not activated. An attacker can send a request to the application with a manipulated Host header pointing to a server controlled by them, which results in generating a password reset link that directs the victim to a malicious domain. The code responsible for this behavior is located in the app/Providers/AppServiceProvider.php file.
An attacker can intercept the victim's password reset token when they click on a crafted link, which consequently leads to account takeover. The vulnerability enables remote attacks without authentication and without interaction from the attacker beyond generating an appropriate request.
Patches available from the vendor should be applied in accordance with the references. As a workaround, the 'app.force_url' parameter should be explicitly configured in the application's configuration file, indicating the correct base address, which prevents the use of the Host header to generate URLs.
Monica version 4.1.2 with default configuration, where the 'app.force_url' parameter is not set (default value 'false').
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NMonicahq Monica
APPMonicahq4.1.2
Related vulnerabilities
MonicaHQ v4.1.2 was discovered to contain multiple authenticated Client-Side Injection vulnerabilities via the...
MonicaHQ version 4.0.0 allows an authenticated remote attacker to execute malicious code in the application vi...
MonicaHQ version 4.0.0 allows an authenticated remote attacker to execute malicious code in the application vi...
Monica 4.1.2 is vulnerable to Cross Site Scripting (XSS). A malicious user can create a malformed contact and ...
MonicaHQ v4.1.2 was discovered to contain a Client-Side Injection vulnerability via the last_name parameter th...