Skip to main content
CVE Vulnerability Database

CVE-2024-5130: Lunary Authorization Bypass Vulnerability

CVE-2024-5130 is an authorization bypass vulnerability in Lunary that allows unauthenticated users to delete any dataset without proper authorization. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2024-5130 Overview

CVE-2024-5130 is an Incorrect Authorization vulnerability in lunary-ai/lunary versions up to and including 1.2.2. The dataset deletion endpoint fails to verify that the supplied project ID belongs to the authenticated user. As a result, unauthenticated attackers can delete any dataset across the platform by issuing crafted requests to the vulnerable endpoint. The flaw maps to [CWE-862] Missing Authorization and [CWE-639] Authorization Bypass Through User-Controlled Key. The maintainers addressed the issue in version 1.2.8.

Critical Impact

Unauthenticated attackers can remotely delete arbitrary datasets, resulting in permanent loss of training data, evaluation results, and observability records used by AI applications built on Lunary.

Affected Products

  • lunary-ai/lunary versions up to and including 1.2.2
  • Self-hosted Lunary deployments exposing the dataset API
  • AI applications relying on Lunary for prompt and dataset management

Discovery Timeline

  • 2024-06-06 - CVE-2024-5130 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-5130

Vulnerability Analysis

Lunary is an open-source observability and evaluation platform for large language model (LLM) applications. It manages datasets used for prompt engineering, evaluations, and fine-tuning workflows. The dataset deletion route in versions <= 1.2.2 accepts a project ID parameter but does not validate ownership against the requesting user's session or API key.

Because the endpoint also lacks authentication enforcement, any remote actor can issue a DELETE request and remove arbitrary datasets. The vulnerability undermines tenant isolation in multi-project Lunary deployments. Attackers do not need credentials, user interaction, or prior reconnaissance to trigger the flaw.

Root Cause

The root cause is a missing authorization check on the dataset deletion handler. The server-side route trusts the projectId value supplied in the request without comparing it to the project memberships of the calling identity. Combined with the absence of an authentication guard, the route exposes a direct object reference that any caller can exploit. The fix in commit 14078c1d2b8766075bf655f187ece24c7a787776 introduces ownership validation before processing the delete operation. See the GitHub commit for the corrective code.

Attack Vector

An attacker reaches the vulnerable endpoint over the network without authentication. They submit a DELETE HTTP request targeting the dataset route with an arbitrary or enumerated dataset identifier. The server processes the request and removes the targeted dataset records. Full technical detail is available in the Huntr bounty report.

No verified public exploit code is available. Refer to the vendor advisory for technical details.

Detection Methods for CVE-2024-5130

Indicators of Compromise

  • Unexpected DELETE requests against Lunary dataset API routes from unauthenticated or unknown sources
  • Missing or zero-count datasets in projects that previously held evaluation or training data
  • HTTP 2xx responses to dataset deletion calls lacking an associated Authorization header or session cookie

Detection Strategies

  • Review Lunary application logs for DELETE requests to dataset endpoints and correlate with authenticated session identifiers
  • Enable database audit logging on the datasets table to capture row deletions and the originating connection metadata
  • Inspect reverse proxy or web application firewall (WAF) logs for sequential dataset ID enumeration patterns

Monitoring Recommendations

  • Alert on any dataset deletion request that lacks a valid session token or API key
  • Track baseline dataset deletion volume per project and flag anomalous spikes
  • Forward Lunary API access logs to a centralized logging platform for retention and correlation

How to Mitigate CVE-2024-5130

Immediate Actions Required

  • Upgrade Lunary to version 1.2.8 or later, which contains the authorization fix
  • Restrict network exposure of Lunary instances to trusted internal networks or VPN-only access until patched
  • Back up all Lunary datasets and verify restore procedures before applying changes
  • Rotate API tokens and audit project membership after confirming upgrade completion

Patch Information

The vulnerability is resolved in Lunary version 1.2.8. The fix is implemented in commit 14078c1d2b8766075bf655f187ece24c7a787776, which adds authorization validation ensuring the project ID in dataset deletion requests belongs to the authenticated user. Operators of self-hosted Lunary deployments should pull the patched release from the official lunary-ai/lunary repository.

Workarounds

  • Place the Lunary API behind a reverse proxy that enforces authentication on dataset deletion routes
  • Apply WAF rules to block DELETE requests to dataset endpoints lacking a valid session cookie or bearer token
  • Limit inbound access to the Lunary service to known administrative IP ranges until the upgrade is deployed

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.