Skip to main content
CVE Vulnerability Database

CVE-2024-7474: Lunary Auth Bypass Vulnerability

CVE-2024-7474 is an authentication bypass vulnerability in Lunary 1.3.2 caused by Insecure Direct Object Reference. Attackers can view or delete external user data by manipulating ID parameters. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2024-7474 Overview

CVE-2024-7474 is an Insecure Direct Object Reference (IDOR) vulnerability in lunary-ai/lunary version 1.3.2. The application fails to validate authorization on the id parameter in request URLs handling external user records. An authenticated attacker can substitute another user's identifier to view or delete external user data they do not own. The flaw is tracked under CWE-639: Authorization Bypass Through User-Controlled Key.

Critical Impact

Authenticated attackers can enumerate and delete external user records belonging to other tenants, breaking confidentiality and integrity of user data in Lunary deployments.

Affected Products

  • lunary-ai/lunary version 1.3.2
  • Lunary AI observability platform instances prior to the fix commit 8f563c7
  • Self-hosted Lunary deployments exposing the external users API

Discovery Timeline

  • 2024-10-29 - CVE-2024-7474 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-7474

Vulnerability Analysis

Lunary is an open-source observability and analytics platform for large language model applications. Version 1.3.2 exposes API endpoints that operate on external user records identified by an id parameter passed in the request URL. The endpoints accept the identifier and perform read or delete operations without confirming that the requesting principal owns or has access to the referenced object.

An authenticated user can issue requests with arbitrary id values to retrieve or remove external users belonging to other projects or tenants. The vulnerability does not require elevated privileges or user interaction, and it can be triggered remotely over the network.

Root Cause

The root cause is missing object-level authorization on routes that handle external user lookups and deletions. The handler trusts the URL-supplied identifier and queries the data store directly. There is no check binding the id value to the caller's session, project scope, or role. This pattern matches CWE-639, where access decisions rely on a user-controlled key instead of a server-side authorization model.

Attack Vector

Exploitation requires only valid authentication to the Lunary API. An attacker enumerates or guesses external user identifiers and submits HTTP requests against the vulnerable endpoint. A GET request returns the targeted record, while a DELETE request removes it. No memory corruption, payload crafting, or social engineering is needed. See the Huntr bounty disclosure for the reported behavior and the upstream fix commit for the corrected authorization logic.

Detection Methods for CVE-2024-7474

Indicators of Compromise

  • Unexpected DELETE requests against external user API routes referencing IDs the caller did not create.
  • Sequential or enumeration-style GET requests against external user endpoints from a single authenticated session.
  • Audit log entries showing external user records deleted without a matching administrative action.
  • API access patterns where one project's token interacts with another project's id values.

Detection Strategies

  • Inspect application access logs for requests to external user endpoints and correlate the id parameter with the authenticated principal's owned objects.
  • Alert on high-rate read or delete operations against external user routes from a single user or API key.
  • Compare the project or tenant scope of the authenticated session against the project scope of the referenced id.

Monitoring Recommendations

  • Enable verbose API audit logging on the Lunary backend and forward records to a centralized log platform.
  • Track baselines for external user read and delete volume per API key, and alert on deviations.
  • Monitor for HTTP 200 responses on routes that should return 403 when cross-tenant identifiers are requested.

How to Mitigate CVE-2024-7474

Immediate Actions Required

  • Upgrade lunary-ai/lunary to a version that includes the fix commit 8f563c7 or later.
  • Rotate API keys and session tokens issued by affected Lunary instances to invalidate any reuse by attackers.
  • Audit external user tables for unexpected deletions or access since the vulnerable version was deployed.
  • Restrict network exposure of the Lunary API to trusted clients while patching.

Patch Information

The vendor addressed the missing authorization checks in commit 8f563c77d8614a72980113f530c7a9ec15a5f8d5 on the lunary-ai/lunary GitHub repository. The patch enforces server-side validation that the requesting user's project owns the referenced external user before allowing read or delete operations. Operators of self-hosted instances must redeploy from a build containing this commit.

Workarounds

  • Place the Lunary API behind a reverse proxy that enforces additional access control on external user routes until the patch is applied.
  • Temporarily disable delete operations on external user endpoints at the proxy layer to prevent destructive exploitation.
  • Limit API token issuance to trusted users and reduce token lifetimes while remediation is in progress.
bash
# Upgrade lunary to a patched build from source
git clone https://github.com/lunary-ai/lunary.git
cd lunary
git checkout 8f563c77d8614a72980113f530c7a9ec15a5f8d5
# Build and redeploy according to your environment
npm install && npm run build

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.