CVE-2024-5478: Withdrawn Advisory Cross-Site Scripting Vulnerability
HIGHCVE-2024-5478 is a HIGH (CVSS 7.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Withdrawn Advisory libraries in the npm ecosystem. The issue involves lunary-ai/lunary xss in saml metadata endpoint. Remediation is available in the latest vendor maintenance releases.
CVE-2024-5478 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2024-5478
To remediate this vulnerability, upgrade all affected Withdrawn Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install lunary@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls lunary
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-5478, inspect your project dependencies using npm:
npm ls lunary
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls lunary command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Withdrawn Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-5478 Affected Withdrawn Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lunary
|
npm |
≤ 1.2.7
|
|
References
Frequently Asked Questions
What is CVE-2024-5478?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2024-5478?
Is lunary affected?
What is the CVSS score of CVE-2024-5478?
What CWE is associated with CVE-2024-5478?
How can I check npm dependencies for CVE-2024-5478?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rpx8-fg6w-rm6x",
"modified" : "2025-06-20T20:01:58Z",
"published" : "2024-06-06T21:30:37Z",
"withdrawn" : "2025-06-20T19:59:45Z",
"aliases" : [ "CVE-2024-5478" ],
"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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "lunary"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.2.7"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-19T19:59:18Z",
"nvd_published_at" : "2024-06-06T19:16:08Z"
}
}