# CVE-2024-5478: Lunary XSS in SAML metadata endpoint

Source: https://junglewise.ai/threats/cve-2024-5478-lunary-xss-in-saml-metadata-endpoint  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-06-06. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-5478 · Severity: low · CVSS 3 · Published 2024-06-06

Lunary, a backend service platform, contained a cross-site scripting (XSS) vulnerability in its SAML authentication metadata endpoint. An attacker could inject malicious JavaScript code through an unsanitized organization ID parameter, potentially allowing theft of user cookies or authentication tokens. This advisory has been withdrawn because the affected component does not correspond to a supported package ecosystem product.

Technologies: [lunary (npm)](https://junglewise.ai/threats/technologies/lunary). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2024-5478 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-5478 being exploited in the wild.

**How severe is CVE-2024-5478?** Low severity, with a CVSS score of 3, published 6 June 2024.

**Which products and versions are affected?** lunary (npm) SEMVER:introduced=0,last_affected=1.2.7.

**Is there a fix for CVE-2024-5478?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2024-5478 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2024-5478?** Check whether you run lunary (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A reflected XSS vulnerability (CWE-79) exists in the SAML metadata endpoint /auth/saml/${org?.id}/metadata due to improper input validation on the orgId parameter. The application directly embeds the orgId into generated XML SAML metadata responses without sanitization, allowing arbitrary JavaScript injection. The vulnerability requires user interaction (clicking a malicious link) and is network-accessible without authentication. An attacker can craft a URL with a malicious orgId to execute arbitrary JavaScript in a victim's browser context, compromising session cookies and authentication tokens. The advisory was withdrawn in June 2025 as the npm package "lunary" references a different repository than the vulnerable lunary-ai/lunary backend; however, the underlying vulnerability remains valid for the backend codebase.

## Affected products

- lunary-ai lunary 1.2.7 and earlier

## Identifiers

- CVE-2024-5478
- GHSA-rpx8-fg6w-rm6x

## Timeline

- 2024-06-06: disclosed
- 2025-06-20: withdrawn

## References

- [https://github.com/lunary-ai/lunary](https://github.com/lunary-ai/lunary)

## Related threats

- [Lunary improper access control in invite user functionality](https://junglewise.ai/threats/cve-2024-6087-lunary-improper-access-control-in-invite-user-functionality)
- [Lunary information disclosure in runs endpoint](https://junglewise.ai/threats/cve-2024-6867-lunary-information-disclosure-in-runs-endpoint)
- [Lunary Cross-Site Request Forgery in CORS](https://junglewise.ai/threats/cve-2024-6862-lunary-cross-site-request-forgery-in-cors)
- [Lunary improper authentication in SAML configuration](https://junglewise.ai/threats/cve-2024-6582-lunary-improper-authentication-in-saml-configuration)
- [Lunary-ai Lunary access control bypass in prompt variation management](https://junglewise.ai/threats/lunary-ai-lunary-access-control-bypass-in-prompt-variation-management-cd347a2d)
