CVE-2024-5389: Lunary Lunary-ai/lunary Access Control Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-3mwc-2cj7-gx8c
CVSS 9.3
CWE-1220
Published
Advisory Summary

CVE-2024-5389 is a MODERATE (CVSS 9.3) lunary-ai/lunary access control vulnerability vulnerability (CWE-1220: Insufficient Granularity of Access Control) affecting Lunary libraries in the npm ecosystem. The issue involves lunary-ai/lunary access control vulnerability in prompt variation management. Remediation is available by upgrading affected packages to version 1.4.9.

CVE-2024-5389 at a Glance

CVE Identifier CVE-2024-5389
GHSA Identifier GHSA-3mwc-2cj7-gx8c
Severity MODERATE
CVSS v3.1 Base Score 9.3
CWE Classification CWE-1220: Insufficient Granularity of Access Control
Affected Product Lunary
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.3

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:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-5389

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.

lunary fixed: 1.4.9
npm install lunary@1.4.9
Verify Direct and Transitive Dependencies

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-5389, 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.4.9), 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-1220: Insufficient Granularity of Access Control, where the product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. however, implemented access controls lack required granularity, which renders the control policy too broad because it allows accesses from unauthorized agents to the security-sensitive assets. 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

Withdrawn: This advisory was incorrectly linked the the npm package `lunary`. The advisory is valid, but not for that package. In lunary-ai/lunary version 1.2.13, an insufficient granularity of access control vulnerability allows users to create, update, get, and delete prompt variations for datasets not owned by their organization. This issue arises due to the application not properly validating the ownership of dataset prompts and their variations against the organization or project of the requesting user. As a result, unauthorized modifications to dataset prompts can occur, leading to altered or removed dataset prompts without proper authorization. This vulnerability impacts the integrity and consistency of dataset information, potentially affecting the results of experiments.

CVE-2024-5389 Affected Lunary Versions

1 component(s)
Fixed Versions:
1.4.9
Product / Package Ecosystem Affected Versions Fixed Version
lunary
npm
< 1.4.9
1.4.9

References

Frequently Asked Questions

What is CVE-2024-5389?
CVE-2024-5389 is a security vulnerability in Lunary involving lunary-ai/lunary Access Control Vulnerability in Prompt Variation Management under CWE-1220: Insufficient Granularity of Access Control.
Which Lunary versions are affected?
Affected versions include releases prior to 1.4.9 across affected packages: lunary.
What version fixes CVE-2024-5389?
Upgrading to 1.4.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lunary affected?
Yes, lunary is affected in releases prior to 1.4.9. Upgrade your dependency to 1.4.9 or later.
What is the CVSS score of CVE-2024-5389?
CVE-2024-5389 has a CVSS v3.1 base score of 9.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2024-5389?
CVE-2024-5389 is classified under CWE-1220: Insufficient Granularity of Access Control (The product implements access controls via a policy or other feature with the intention to disable or restrict accesses (reads and/or writes) to assets in a system from untrusted agents. However, implemented access controls lack required granularity, which renders the control policy too broad because it allows accesses from unauthorized agents to the security-sensitive assets.).
How can I check npm dependencies for CVE-2024-5389?
Run the dependency tree command: 'npm ls lunary'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3mwc-2cj7-gx8c",
  "modified" : "2024-11-25T15:40:28Z",
  "published" : "2024-06-10T00:30:39Z",
  "withdrawn" : "2024-11-18T19:40:41Z",
  "aliases" : [ "CVE-2024-5389" ],
  "summary" : "lunary-ai/lunary Access Control Vulnerability in Prompt Variation Management",
  "details" : "Withdrawn: This advisory was incorrectly linked the the npm package `lunary`. The advisory is valid, but not for that package.\n\nIn lunary-ai/lunary version 1.2.13, an insufficient granularity of access control vulnerability allows users to create, update, get, and delete prompt variations for datasets not owned by their organization. This issue arises due to the application not properly validating the ownership of dataset prompts and their variations against the organization or project of the requesting user. As a result, unauthorized modifications to dataset prompts can occur, leading to altered or removed dataset prompts without proper authorization. This vulnerability impacts the integrity and consistency of dataset information, potentially affecting the results of experiments.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "lunary"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5389"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lunary-ai/lunary/commit/35dd4af0001a54ccb14276a1546eb977f82c0c5e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lunary-ai/lunary"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/3ca5309f-5615-4d5b-8043-968af220d7a2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1220" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-10T18:36:36Z",
    "nvd_published_at" : "2024-06-09T23:15:50Z"
  }
}