Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-5352

CVE-2025-5352: Lunary Analytics Stored XSS Vulnerability

CVE-2025-5352 is a critical stored XSS flaw in Lunary Analytics that allows arbitrary JavaScript execution through unsafe environment variable injection. This article covers technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2025-5352 Overview

A critical stored Cross-Site Scripting (XSS) vulnerability exists in the Analytics component of lunary-ai/lunary versions up to 1.9.23. The vulnerability occurs because 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.

Critical Impact

This vulnerability enables complete account takeover, data exfiltration, malware distribution, and persistent attacks affecting all users until the malicious environment variable is removed.

Affected Products

  • Lunary versions up to and including 1.9.23
  • Lunary Analytics component
  • All deployments using the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable

Discovery Timeline

  • 2025-08-23 - CVE-2025-5352 published to NVD
  • 2025-11-26 - Last updated in NVD database

Technical Details for CVE-2025-5352

Vulnerability Analysis

This stored XSS vulnerability resides in the Analytics component of Lunary, an AI observability platform. The root issue stems from the unsafe use of React's dangerouslySetInnerHTML property to inject user-controllable content directly into the rendered page without proper sanitization.

When the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable is configured, its contents are rendered directly into the DOM, bypassing React's built-in XSS protections. An attacker who gains control over this environment variable—either through deployment pipeline compromise, configuration injection, or server access—can inject arbitrary JavaScript that executes in the context of every authenticated user's browser session.

The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation), which represents a failure to properly sanitize user-supplied input before including it in dynamically generated web content.

Root Cause

The vulnerability exists because the application directly embeds the value of NEXT_PUBLIC_CUSTOM_SCRIPT into the page using dangerouslySetInnerHTML without implementing any input validation, content sanitization, or Content Security Policy restrictions. This React pattern explicitly bypasses the framework's built-in XSS protections and should only be used with trusted, pre-sanitized content.

Attack Vector

The attack requires network access and user interaction. An attacker must first gain the ability to modify the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable, which could be achieved through:

  • Compromising the deployment pipeline or CI/CD configuration
  • Gaining access to the server's environment configuration
  • Exploiting misconfigured environment variable management systems
  • Social engineering deployment personnel

Once the malicious script is injected, it executes automatically in every user's browser when they access the Analytics component. The scope is changed, meaning the attack can affect resources beyond the vulnerable component, leading to session hijacking, credential theft, and lateral movement within the application.

The vulnerability mechanism involves the dangerouslySetInnerHTML React property being used to inject the environment variable contents directly into the page. When a malicious payload is placed in NEXT_PUBLIC_CUSTOM_SCRIPT, it renders as executable JavaScript in the browser context of all users accessing the affected component. For detailed technical analysis, see the Huntr Bounty Listing.

Detection Methods for CVE-2025-5352

Indicators of Compromise

  • Unexpected or unauthorized values in the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable
  • Suspicious JavaScript code appearing in page source when viewing the Analytics component
  • Unusual outbound network connections from user browsers to unknown domains
  • Reports of session hijacking, unauthorized account access, or credential theft

Detection Strategies

  • Review environment variable configurations for any unexpected script content in NEXT_PUBLIC_CUSTOM_SCRIPT
  • Monitor deployment pipelines and CI/CD systems for unauthorized configuration changes
  • Implement file integrity monitoring on server configuration files
  • Analyze browser console logs and network traffic for signs of malicious script execution

Monitoring Recommendations

  • Enable logging and alerting for changes to environment variables in production deployments
  • Implement Content Security Policy (CSP) headers to restrict script sources and detect violations
  • Monitor for unusual authentication patterns that may indicate session hijacking
  • Set up alerts for configuration drift in deployment environments

How to Mitigate CVE-2025-5352

Immediate Actions Required

  • Upgrade Lunary to version 1.9.25 or later immediately
  • Audit the current value of NEXT_PUBLIC_CUSTOM_SCRIPT for any malicious content
  • Review access logs for unauthorized modifications to environment configurations
  • Force re-authentication for all users if compromise is suspected

Patch Information

The vulnerability is fixed in Lunary version 1.9.25. The security patch is available via the GitHub commit. Organizations should update to the patched version as soon as possible to eliminate the vulnerability.

Workarounds

  • Remove or clear the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable until patching is complete
  • Implement strict access controls for environment variable management and deployment configurations
  • Deploy Content Security Policy headers to restrict inline script execution
  • Monitor environment configurations for unauthorized changes using infrastructure-as-code validation

If immediate patching is not possible, administrators should ensure the NEXT_PUBLIC_CUSTOM_SCRIPT environment variable is either unset or contains only trusted, validated content. Restricting access to deployment systems and implementing configuration change monitoring provides additional defense-in-depth protection.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechLunary

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-79
  • Vendor Resources
  • GitHub Commit Changes

  • Huntr Bounty Listing
  • Related CVEs
  • CVE-2024-5386: Lunary Auth Bypass Vulnerability

  • CVE-2024-9095: Lunary Information Disclosure Vulnerability

  • CVE-2024-7475: Lunary Auth Bypass Vulnerability

  • CVE-2024-1741: Lunary Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English