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

- Severity: High 7.4 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-06T18:20:05.917Z
- Modified: 2026-09-10T03:50:15.875Z
- Also known as: GHSA-rpx8-fg6w-rm6x
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: @huntr_ai

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

(As written by CVE List.)

## Affected

- lunary-ai lunary-ai/lunary: from unspecified up to latest
- lunary lunary: up to 1.2.7; 1.2.7
- lunary (npm): up to 1.2.7

## Every score

- @huntr_ai: CVSS:3.0 7.4 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- GitHub: CVSS:3.0 7.4 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/e899f496-d493-4c06-b596-cb0a88ad451b> (exploit, issue-tracking, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5478> (advisory)
- <https://github.com/lunary-ai/lunary> (package)
- <https://github.com/lunary-ai/lunary/blob/main/packages/backend/src/api/v1/auth/saml.ts#L34> (web)

## Sources

- CVE List: [CVE-2024-5478](https://www.cve.org/CVERecord?id=CVE-2024-5478), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-rpx8-fg6w-rm6x](https://github.com/advisories/GHSA-rpx8-fg6w-rm6x), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-5478](https://nvd.nist.gov/vuln/detail/CVE-2024-5478), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-5478 · Whole record: https://cve.day/CVE-2024-5478.json · Rebuilt by cve.day 2026-11-25T22:58:41.526Z
