CVE-2024-4146: Lunary Lunary-ai/lunary Allows Users Unauthorized Access Vulnerability
CRITICALCVE-2024-4146 is a CRITICAL (CVSS 9.8) lunary-ai/lunary allows users unauthorized access vulnerability (CWE-285: Improper Authorization) affecting Lunary libraries in the npm ecosystem. The issue involves lunary-ai/lunary allows users unauthorized access to projects. Remediation is available by upgrading affected packages to version 1.2.26.
CVE-2024-4146 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-4146
To remediate this vulnerability, upgrade all affected Lunary 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@1.2.26
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-4146, inspect your project dependencies using npm:
npm ls lunary
Analyze the terminal output to locate any version of Lunary in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.26), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Lunary, 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-4146 Affected Lunary Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lunary
|
npm |
< 1.2.26
|
1.2.26
|
References
Frequently Asked Questions
What is CVE-2024-4146?
Which Lunary versions are affected?
What version fixes CVE-2024-4146?
Is lunary affected?
What is the CVSS score of CVE-2024-4146?
What CWE is associated with CVE-2024-4146?
How can I check npm dependencies for CVE-2024-4146?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w5xm-mx47-v7c8",
"modified" : "2024-11-18T19:40:39Z",
"published" : "2024-06-08T21:30:38Z",
"withdrawn" : "2024-11-18T19:40:39Z",
"aliases" : [ "CVE-2024-4146" ],
"summary" : "lunary-ai/lunary allows users unauthorized access to projects",
"details" : "Withdrawn: This advisory was incorrectly linked the the npm package `lunary`. The advisory is valid, but not for that packlage.\n\nIn lunary-ai/lunary version v1.2.13, an incorrect authorization vulnerability exists that allows unauthorized users to access and manipulate projects within an organization they should not have access to. Specifically, the vulnerability is located in the `checkProjectAccess` method within the authorization middleware, which fails to adequately verify if a user has the correct permissions to access a specific project. Instead, it only checks if the user is part of the organization owning the project, overlooking the necessary check against the `account_project` table for explicit project access rights. This flaw enables attackers to gain complete control over all resources within a project, including the ability to create, update, read, and delete any resource, compromising the privacy and security of sensitive information.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "lunary"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.26"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-4146"
}, {
"type" : "WEB",
"url" : "https://github.com/lunary-ai/lunary/commit/c43b6c62035f32ca455f66d5fd22ba661648cde7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lunary-ai/lunary"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/a749e696-b398-4260-b2d0-b0054b9fffa7"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285", "CWE-863" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-10T15:33:08Z",
"nvd_published_at" : "2024-06-08T20:15:52Z"
}
}