{"id":"GHSA-rpx8-fg6w-rm6x","summary":"Withdrawn Advisory: lunary-ai/lunary XSS in SAML metadata endpoint","details":"## Withdrawn Advisory\nThis advisory has been withdrawn because the [lunary npm package](https://www.npmjs.com/package/lunary) is connected to https://github.com/lunary-ai/lunary-js, not the https://github.com/lunary-ai/lunary repo that is discussed in this advisory.\n\n**The underlying vulnerability report is still valid**, but it doesn't affect a product in a [GitHub Advisory Database supported ecosystem](https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#github-reviewed-advisories).\n\nThis link is maintained to preserve external references.\n\n## Original Description\nA 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.","aliases":["CVE-2024-5478"],"modified":"2026-09-10T03:50:15.875543380Z","published":"2024-06-06T21:30:37Z","withdrawn":"2025-06-20T19:59:45Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2024-07-19T19:59:18Z","nvd_published_at":"2024-06-06T19:16:08Z","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5478"},{"type":"PACKAGE","url":"https://github.com/lunary-ai/lunary"},{"type":"WEB","url":"https://github.com/lunary-ai/lunary/blob/main/packages/backend/src/api/v1/auth/saml.ts#L34"},{"type":"WEB","url":"https://huntr.com/bounties/e899f496-d493-4c06-b596-cb0a88ad451b"}],"affected":[{"package":{"name":"lunary","ecosystem":"npm","purl":"pkg:npm/lunary"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.2.7"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-rpx8-fg6w-rm6x/GHSA-rpx8-fg6w-rm6x.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"}]}