CVE-2024-1738 Overview
CVE-2024-1738 is an incorrect authorization vulnerability [CWE-863] in the lunary-ai/lunary repository. The flaw resides in the evaluations.get route of the evaluations API endpoint. The underlying SQL query fails to validate the project identifier against the requesting user's organization. Any authenticated or unauthenticated attacker who knows or guesses an evaluation ID can retrieve another organization's evaluation results. This results in cross-tenant disclosure of potentially private evaluation data stored in the platform.
Critical Impact
Attackers can retrieve any organization's evaluation results by submitting a known evaluation ID to the evaluations.get endpoint without project ID verification.
Affected Products
- lunary-ai/lunary repository (lunary:lunary)
- Lunary evaluations API endpoint (evaluations.get route)
- Versions prior to commit a4e61122e61dc31460cfbe54d15fae389cc440ce
Discovery Timeline
- 2024-04-16 - CVE-2024-1738 published to NVD
- 2025-01-10 - Last updated in NVD database
Technical Details for CVE-2024-1738
Vulnerability Analysis
The vulnerability exists in the evaluations.get route of Lunary's evaluations API. The handler accepts an evaluation ID parameter and queries the database for the matching record. The SQL query filters only on the evaluation ID and omits a join or WHERE clause that constrains results to the caller's project or organization. Lunary is a multi-tenant platform used for monitoring and evaluating large language model (LLM) applications. Evaluation records can contain prompts, model outputs, and test data that organizations consider proprietary. The missing tenant check breaks the platform's authorization model.
Root Cause
The root cause is missing authorization enforcement at the data access layer, classified under [CWE-863] Incorrect Authorization. The route relied on the evaluation ID acting as an opaque identifier rather than verifying ownership. Evaluation IDs are not random secrets and can be enumerated or leaked through logs, shared links, or referrer headers. The fix adds project ID validation to the SQL query so results are scoped to the caller's project context.
Attack Vector
The attack is remote and requires no privileges or user interaction. An attacker sends a crafted HTTP request to the evaluations.get endpoint with a target evaluation ID. The server returns the full evaluation record regardless of which organization owns it. Refer to the GitHub Commit Details and the Huntr Bounty Information for the technical breakdown of the unpatched query and the corrected version.
Detection Methods for CVE-2024-1738
Indicators of Compromise
- Unexpected HTTP GET requests to the evaluations.get API route from unknown clients or IP addresses
- Access patterns where a single session retrieves evaluation IDs that do not belong to the authenticated user's project
- Sequential or enumerated evaluation ID lookups in application logs suggesting brute-force discovery
Detection Strategies
- Review API gateway and application logs for requests to the evaluations.get endpoint and correlate the requested evaluation ID with the caller's project ID
- Alert on responses where the returned record's project_id differs from the authenticated session's project
- Baseline normal evaluation retrieval volume per user and flag accounts exceeding the baseline
Monitoring Recommendations
- Forward Lunary application logs to a centralized logging or SIEM platform for retention and correlation
- Implement audit logging on every evaluation read with caller identity, project ID, and target evaluation ID recorded
- Monitor outbound data volumes from the Lunary service for signs of bulk evaluation exfiltration
How to Mitigate CVE-2024-1738
Immediate Actions Required
- Upgrade Lunary to a version that includes commit a4e61122e61dc31460cfbe54d15fae389cc440ce or later
- Audit evaluation access logs since deployment for cross-tenant reads and notify affected organizations if found
- Rotate any secrets, prompts, or API keys that may have been exposed inside evaluation payloads
Patch Information
The maintainers fixed the issue in commit a4e61122e61dc31460cfbe54d15fae389cc440ce, which adds project ID verification to the SQL query backing the evaluations.get route. Details are available in the GitHub Commit Details and the Huntr Bounty Information.
Workarounds
- Restrict network access to the Lunary API using firewall or reverse proxy allow-lists until the patch is applied
- Deploy a reverse proxy rule that blocks or rate-limits requests to the evaluations.get route from unauthenticated sources
- Apply a temporary middleware check that validates the caller's project ID against the requested evaluation record before returning a response
# Configuration example: pin Lunary to a patched commit via Docker
git clone https://github.com/lunary-ai/lunary.git
cd lunary
git checkout a4e61122e61dc31460cfbe54d15fae389cc440ce
docker compose build
docker compose up -d
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

