CVE-2024-53274 in Habaticainfo

Summary

by MITRE • 12/12/2024

Habitica is an open-source habit-building program. Versions prior to 5.28.5 are vulnerable to reflected cross-site scripting. The `register` function in `home.vue` containsa reflected XSS vulnerability due to an incorrect sanitization function. An attacker can specify a malicious `redirectTo` parameter to trigger the vulnerability. Arbitrary javascript can be executed by the attacker in the context of the victim’s session. Version 5.28.5 contains a patch.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 09/06/2025

The vulnerability identified as CVE-2024-53274 affects Habitica, an open-source habit-building application that helps users establish and maintain daily routines through gamification elements. This application serves millions of users globally who rely on its platform to track their habits, achievements, and personal development goals. The security flaw resides within the application's client-side processing logic, specifically in the registration functionality where user input is improperly handled, creating a dangerous pathway for malicious actors to exploit.

The technical flaw manifests in the `register` function located within the `home.vue` component file of the application's frontend codebase. This vulnerability represents a classic reflected cross-site scripting issue where the application fails to properly sanitize user-supplied input before incorporating it into the page's dynamic content. The vulnerability specifically occurs when processing the `redirectTo` parameter, which is typically used to determine where users should be redirected after successful registration. The application's sanitization function is inadequate and fails to properly escape or validate the input, allowing malicious payloads to be executed within the victim's browser context.

The operational impact of this vulnerability is significant as it allows attackers to execute arbitrary JavaScript code within the context of authenticated users' sessions. This creates a severe security risk where malicious actors can perform actions on behalf of legitimate users, potentially accessing personal data, modifying habits, manipulating achievement tracking, or even transferring user accounts. The reflected nature of the vulnerability means that attackers must lure victims to click on specially crafted links containing malicious payloads, making this a server-side request forgery variant that leverages user trust and session context. This vulnerability directly maps to CWE-79 which defines cross-site scripting flaws, and aligns with ATT&CK technique T1531 which involves modifying existing programs to gain access to systems.

The patch implemented in version 5.28.5 addresses this vulnerability by strengthening the input sanitization process for the `redirectTo` parameter. Security researchers recommend that all users immediately upgrade to this patched version to eliminate the risk of exploitation. Organizations should also implement additional security measures including input validation at multiple layers, content security policies, and regular security audits of frontend components to prevent similar issues. The vulnerability demonstrates the critical importance of proper input validation and output encoding in web applications, particularly those handling user registration and authentication flows where session hijacking risks are elevated. Security teams should monitor for similar patterns in other frontend components and ensure comprehensive testing of all user-controllable parameters to prevent reflected XSS vulnerabilities from compromising user sessions and personal data integrity.

Responsible

GitHub M

Reservation

11/19/2024

Disclosure

12/12/2024

Moderation

accepted

CPE

ready

EPSS

0.00459

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!