Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. lunary
  4. ›
  5. CVE-2024-5478

CVE-2024-5478: lunary-ai/lunary XSS in SAML metadata endpoint

June 6, 2024 (updated July 19, 2024)

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.

References

  • github.com/advisories/GHSA-rpx8-fg6w-rm6x
  • github.com/lunary-ai/lunary
  • github.com/lunary-ai/lunary/blob/main/packages/backend/src/api/v1/auth/saml.ts
  • huntr.com/bounties/e899f496-d493-4c06-b596-cb0a88ad451b
  • nvd.nist.gov/vuln/detail/CVE-2024-5478

Code Behaviors & Features

Detect and mitigate CVE-2024-5478 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.2.7

Solution

Unfortunately, there is no solution available yet.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/lunary/CVE-2024-5478.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:04 +0000.