CVE-2024-5128

8.8 HIGH

📋 TL;DR

This IDOR vulnerability in lunary-ai/lunary allows unauthorized users to view, modify, or delete any dataset_prompt or dataset_prompt_variation across all datasets and projects. It affects all users running versions up to 1.2.2. The vulnerability stems from insufficient access control checks in dataset management endpoints.

💻 Affected Systems

Products:
  • lunary-ai/lunary
Versions: up to and including 1.2.2
Operating Systems: all
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments of lunary up to version 1.2.2 regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of all dataset prompts and variations across all projects, leading to data destruction, unauthorized data access, and potential data manipulation affecting AI model training.

🟠

Likely Case

Unauthorized users accessing and modifying dataset prompts they shouldn't have access to, potentially corrupting training data or exposing sensitive prompt information.

🟢

If Mitigated

Limited impact with proper network segmentation and access controls, but still vulnerable to authenticated users exceeding their permissions.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but minimal technical skill to manipulate object IDs in API requests.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.25

Vendor Advisory: https://github.com/lunary-ai/lunary/commit/0755dde1afc2a74ec23b55eee03e4416916cf48f

Restart Required: Yes

Instructions:

1. Backup your current lunary installation and data. 2. Update lunary to version 1.2.25 or later using your package manager or deployment method. 3. Restart the lunary service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Network Access Restriction

all

Restrict access to lunary endpoints to only authorized users and networks.

API Rate Limiting

all

Implement rate limiting on dataset management endpoints to detect and block suspicious activity.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate lunary from untrusted networks.
  • Deploy a web application firewall (WAF) with IDOR protection rules to detect and block exploitation attempts.

🔍 How to Verify

Check if Vulnerable:

Check your lunary version. If it's 1.2.2 or earlier, you are vulnerable.

Check Version:

Check your lunary deployment method (e.g., docker inspect, package manager, or check application settings).

Verify Fix Applied:

After updating, verify the version is 1.2.25 or later and test that users cannot access dataset prompts outside their permissions.

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to dataset_prompt or dataset_prompt_variation endpoints
  • Failed authorization attempts followed by successful access to unauthorized resources
  • Multiple requests to sequential object IDs

Network Indicators:

  • Unusual API call patterns to /api/datasets/* endpoints
  • Requests manipulating dataset_prompt IDs outside expected ranges

SIEM Query:

source="lunary" AND (uri_path="/api/datasets/*" OR uri_path="/api/projects/*/datasets/*") AND (http_status=200 OR http_status=204) AND user_id NOT IN authorized_users_for_resource

🔗 References

📤 Share & Export