Skip to main content
DashboardThreatsMapFeedsAPI
reconnecting
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-5352: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lunary-ai lunary-ai/lunary

0
High
VulnerabilityCVE-2025-5352cvecve-2025-5352cwe-79
Published: Sat Aug 23 2025 (08/23/2025, 06:56:09 UTC)
Source: CVE Database V5
Vendor/Project: lunary-ai
Product: lunary-ai/lunary

Description

A critical stored Cross-Site Scripting (XSS) vulnerability exists in the Analytics component of lunary-ai/lunary versions up to 1.9.23, where the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable is directly injected into the DOM using dangerouslySetInnerHTML without any sanitization or validation. This allows arbitrary JavaScript execution in all users' browsers if an attacker can control the environment variable during deployment or through server compromise. The vulnerability can lead to complete account takeover, data exfiltration, malware distribution, and persistent attacks affecting all users until the environment variable is cleaned. The issue is fixed in version 1.9.25.

AI-Powered Analysis

AILast updated: 08/31/2025, 01:06:18 UTC

Technical Analysis

CVE-2025-5352 is a critical stored Cross-Site Scripting (XSS) vulnerability identified in the Analytics component of the lunary-ai/lunary software up to version 1.9.23. The root cause lies in the unsafe handling of the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable, which is injected directly into the Document Object Model (DOM) using React's dangerouslySetInnerHTML method without any sanitization or validation. This flaw allows an attacker who can influence the environment variable—either during deployment or through a server compromise—to inject arbitrary JavaScript code that executes in the browsers of all users accessing the affected application. Because the malicious script is stored persistently in the environment variable, the attack can have a lasting impact until the variable is sanitized or updated. The consequences of exploitation include complete account takeover, unauthorized data exfiltration, malware distribution, and persistent client-side attacks. The vulnerability has a CVSS v3 base score of 8.1, reflecting high severity, with network attack vector, high attack complexity, no privileges required, no user interaction needed, and impacts on confidentiality, integrity, and availability. The issue was addressed and fixed in lunary-ai/lunary version 1.9.25.

Potential Impact

For European organizations using lunary-ai/lunary, especially those relying on its Analytics component, this vulnerability poses a significant risk. Exploitation could lead to widespread compromise of user accounts and sensitive data leakage, undermining trust and potentially violating data protection regulations such as the GDPR. The ability to execute arbitrary JavaScript in user browsers enables attackers to perform session hijacking, credential theft, and deliver malware payloads, which can escalate into broader network intrusions. Persistent XSS attacks can also facilitate long-term surveillance or manipulation of user interactions. Given the criticality of analytics data in business decision-making, the integrity and availability of this component are vital. Organizations in sectors like finance, healthcare, and government, where lunary-ai/lunary might be deployed, could face operational disruptions and reputational damage. Additionally, the lack of required authentication and user interaction lowers the barrier for exploitation, increasing the threat surface.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should immediately upgrade lunary-ai/lunary to version 1.9.25 or later, where the issue is fixed. Until the upgrade is possible, organizations should audit and sanitize the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable to ensure it contains no malicious code. Implement strict validation and sanitization routines for any environment variables or user-controllable inputs that are injected into the DOM. Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts in browsers. Conduct thorough security reviews of deployment pipelines to prevent unauthorized modification of environment variables. Additionally, monitor application logs and user activity for signs of exploitation or anomalous behavior. Educate development and operations teams about the risks of using dangerouslySetInnerHTML without proper sanitization. Finally, consider implementing runtime application self-protection (RASP) solutions to detect and block XSS attacks in real time.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
@huntr_ai
Date Reserved
2025-05-30T08:23:15.862Z
Cvss Version
3.0
State
PUBLISHED

Threat ID: 68a96797ad5a09ad0027ba9c

Added to database: 8/23/2025, 7:02:47 AM

Last enriched: 8/31/2025, 1:06:18 AM

Last updated: 10/7/2025, 12:36:52 PM

Views: 51

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats