CVE-2025-4779: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lunary-ai lunary-ai/lunary
lunary-ai/lunary versions prior to 1.9.24 are vulnerable to stored cross-site scripting (XSS). An unauthenticated attacker can inject malicious JavaScript into the `v1/runs/ingest` endpoint by adding an empty `citations` field, triggering a code path where `dangerouslySetInnerHTML` is used to render attacker-controlled text. This vulnerability allows the execution of arbitrary JavaScript in the context of the user's browser, potentially leading to session hijacking, data theft, or other malicious actions.
AI Analysis
Technical Summary
CVE-2025-4779 is a critical stored cross-site scripting (XSS) vulnerability affecting lunary-ai's lunary product versions prior to 1.9.24. The vulnerability arises from improper neutralization of input during web page generation, specifically within the `v1/runs/ingest` API endpoint. An unauthenticated attacker can exploit this flaw by submitting a request with an empty `citations` field, which triggers a code path where the React property `dangerouslySetInnerHTML` is used to render attacker-controlled content without proper sanitization. This allows the injection and execution of arbitrary JavaScript in the context of the victim user's browser. The impact of this vulnerability includes potential session hijacking, theft of sensitive data, unauthorized actions performed on behalf of the user, and further compromise of the affected web application or its users. The vulnerability has a CVSS v3.0 base score of 9.1, indicating critical severity, with an attack vector that requires no authentication or user interaction, making it highly exploitable remotely. Although no known exploits are currently reported in the wild, the ease of exploitation and the critical impact on confidentiality and integrity make this a significant threat. The vulnerability is categorized under CWE-79, which is a common and well-understood class of web application security flaws related to improper input sanitization and output encoding.
Potential Impact
For European organizations using lunary-ai/lunary, this vulnerability poses a severe risk to the confidentiality and integrity of their web applications and user data. Successful exploitation could lead to session hijacking, allowing attackers to impersonate legitimate users and access sensitive information or perform unauthorized actions. This could result in data breaches involving personal data protected under GDPR, leading to regulatory penalties and reputational damage. Additionally, the execution of arbitrary scripts could facilitate further attacks such as phishing, malware distribution, or lateral movement within the organization's network. Since the vulnerability is exploitable without authentication or user interaction, attackers can target public-facing instances of lunary-ai/lunary, increasing the likelihood of widespread exploitation. The availability impact is low, but the overall business impact is high due to potential data loss, compliance violations, and erosion of user trust.
Mitigation Recommendations
European organizations should immediately upgrade lunary-ai/lunary to version 1.9.24 or later, where this vulnerability is addressed. If upgrading is not immediately feasible, implement strict input validation and sanitization on the `v1/runs/ingest` endpoint to reject or properly encode any input that could be interpreted as executable code. Avoid using `dangerouslySetInnerHTML` or ensure that any use of it is accompanied by robust sanitization libraries such as DOMPurify to neutralize malicious scripts. Employ Content Security Policy (CSP) headers to restrict the execution of untrusted scripts and reduce the impact of potential XSS attacks. Regularly audit and monitor web application logs for suspicious activity related to this endpoint. Conduct security testing, including automated and manual penetration tests focused on XSS vulnerabilities, to verify the effectiveness of mitigations. Additionally, educate developers on secure coding practices to prevent similar issues in future releases.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain
CVE-2025-4779: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lunary-ai lunary-ai/lunary
Description
lunary-ai/lunary versions prior to 1.9.24 are vulnerable to stored cross-site scripting (XSS). An unauthenticated attacker can inject malicious JavaScript into the `v1/runs/ingest` endpoint by adding an empty `citations` field, triggering a code path where `dangerouslySetInnerHTML` is used to render attacker-controlled text. This vulnerability allows the execution of arbitrary JavaScript in the context of the user's browser, potentially leading to session hijacking, data theft, or other malicious actions.
AI-Powered Analysis
Technical Analysis
CVE-2025-4779 is a critical stored cross-site scripting (XSS) vulnerability affecting lunary-ai's lunary product versions prior to 1.9.24. The vulnerability arises from improper neutralization of input during web page generation, specifically within the `v1/runs/ingest` API endpoint. An unauthenticated attacker can exploit this flaw by submitting a request with an empty `citations` field, which triggers a code path where the React property `dangerouslySetInnerHTML` is used to render attacker-controlled content without proper sanitization. This allows the injection and execution of arbitrary JavaScript in the context of the victim user's browser. The impact of this vulnerability includes potential session hijacking, theft of sensitive data, unauthorized actions performed on behalf of the user, and further compromise of the affected web application or its users. The vulnerability has a CVSS v3.0 base score of 9.1, indicating critical severity, with an attack vector that requires no authentication or user interaction, making it highly exploitable remotely. Although no known exploits are currently reported in the wild, the ease of exploitation and the critical impact on confidentiality and integrity make this a significant threat. The vulnerability is categorized under CWE-79, which is a common and well-understood class of web application security flaws related to improper input sanitization and output encoding.
Potential Impact
For European organizations using lunary-ai/lunary, this vulnerability poses a severe risk to the confidentiality and integrity of their web applications and user data. Successful exploitation could lead to session hijacking, allowing attackers to impersonate legitimate users and access sensitive information or perform unauthorized actions. This could result in data breaches involving personal data protected under GDPR, leading to regulatory penalties and reputational damage. Additionally, the execution of arbitrary scripts could facilitate further attacks such as phishing, malware distribution, or lateral movement within the organization's network. Since the vulnerability is exploitable without authentication or user interaction, attackers can target public-facing instances of lunary-ai/lunary, increasing the likelihood of widespread exploitation. The availability impact is low, but the overall business impact is high due to potential data loss, compliance violations, and erosion of user trust.
Mitigation Recommendations
European organizations should immediately upgrade lunary-ai/lunary to version 1.9.24 or later, where this vulnerability is addressed. If upgrading is not immediately feasible, implement strict input validation and sanitization on the `v1/runs/ingest` endpoint to reject or properly encode any input that could be interpreted as executable code. Avoid using `dangerouslySetInnerHTML` or ensure that any use of it is accompanied by robust sanitization libraries such as DOMPurify to neutralize malicious scripts. Employ Content Security Policy (CSP) headers to restrict the execution of untrusted scripts and reduce the impact of potential XSS attacks. Regularly audit and monitor web application logs for suspicious activity related to this endpoint. Conduct security testing, including automated and manual penetration tests focused on XSS vulnerabilities, to verify the effectiveness of mitigations. Additionally, educate developers on secure coding practices to prevent similar issues in future releases.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2025-05-15T14:03:54.703Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 686b9cd26f40f0eb72e2e268
Added to database: 7/7/2025, 10:09:22 AM
Last enriched: 7/7/2025, 10:24:44 AM
Last updated: 7/7/2025, 10:24:44 AM
Views: 2
Related Threats
CVE-2025-7128: SQL Injection in Campcodes Payroll Management System
MediumCVE-2025-6209: CWE-29 Path Traversal: '\..\filename' in run-llama run-llama/llama_index
HighCVE-2025-7127: SQL Injection in itsourcecode Employee Management System
MediumCVE-2025-7126: SQL Injection in itsourcecode Employee Management System
MediumCVE-2025-7125: SQL Injection in itsourcecode Employee Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.