CVE-2025-5352 Environment Variable XSS in Analytics Component in lunary-ai/lunary

High 8.1 Published Updated

Stored XSS in Lunary AI allows arbitrary JavaScript execution via environment variables, leading to account takeover and data exfiltration for all users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-5352?

CVE-2025-5352 is a high-severity cross-site scripting vulnerability in Lunary Lunary, published on 23 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2025-5352?

It affects 1 product.

Products include Lunary Lunary.

How do I fix CVE-2025-5352?

No fix has been published for CVE-2025-5352 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-5352 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5352 exists.

Public exploit code: 1 proofs of concept on GitHub.

All Lunary Lunary vulnerabilities

Sources

Also known as GHSA-6cxf-c9x7-g2q5.

Is CVE-2025-5352 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free