CVE-2025-0281

5.4 MEDIUM

📋 TL;DR

A stored cross-site scripting vulnerability in lunary-ai/lunary allows attackers to inject malicious JavaScript into SAML IdP XML metadata. This JavaScript executes when users attempt SAML login, potentially hijacking sessions or stealing data. Organizations using lunary versions 1.6.7 or earlier are affected.

💻 Affected Systems

Products:
  • lunary-ai/lunary
Versions: 1.6.7 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with SAML authentication configured.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator credentials, compromise user accounts, exfiltrate sensitive data, and maintain persistent access to the lunary platform.

🟠

Likely Case

Attackers hijack user sessions to access sensitive information, modify configurations, or perform unauthorized actions within the lunary platform.

🟢

If Mitigated

With proper input validation and output encoding, the attack fails to execute JavaScript, preventing session hijacking and data theft.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires ability to modify SAML IdP metadata, typically requiring some level of access to SAML configuration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.7.10

Vendor Advisory: https://github.com/lunary-ai/lunary/commit/fa0fd7742ae029ed934690d282519263f5d838de

Restart Required: Yes

Instructions:

1. Backup your lunary installation and database. 2. Update to version 1.7.10 or later using your package manager or deployment method. 3. Restart the lunary service. 4. Verify the fix by checking the version and testing SAML login functionality.

🔧 Temporary Workarounds

Disable SAML Authentication

all

Temporarily disable SAML authentication to prevent exploitation while planning upgrade.

Modify lunary configuration to use alternative authentication methods

Input Validation Filter

all

Implement WAF or proxy rules to filter malicious content in SAML metadata.

Configure WAF rules to block script tags and JavaScript in XML metadata

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to prevent JavaScript execution from untrusted sources
  • Monitor SAML metadata configurations for unauthorized changes and implement change control procedures

🔍 How to Verify

Check if Vulnerable:

Check if lunary version is 1.6.7 or earlier and SAML authentication is enabled.

Check Version:

Check lunary version in admin interface or run: npm list lunary-ai/lunary

Verify Fix Applied:

After updating to 1.7.10 or later, verify that JavaScript injection in SAML metadata no longer executes in browser.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SAML metadata modifications
  • JavaScript errors in browser console related to SAML redirects
  • Failed SAML authentication attempts with suspicious parameters

Network Indicators:

  • SAML metadata containing script tags or JavaScript code
  • Unusual redirects during SAML authentication flow

SIEM Query:

source="lunary" AND (event="saml_metadata_modified" OR event="saml_auth_failed")

🔗 References

📤 Share & Export