CVE-2024-9099

8.1 HIGH

📋 TL;DR

This vulnerability in lunary-ai/lunary exposes both public and private API keys through the GET /projects endpoint to users with minimal permissions like Viewers or Prompt Editors. Attackers can use these credentials to impersonate projects, access private data, and delete resources. All organizations using the affected version are at risk.

💻 Affected Systems

Products:
  • lunary-ai/lunary
Versions: v1.4.29
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments using the vulnerable version regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of all projects through stolen API keys, leading to data exfiltration, resource destruction, and unauthorized administrative actions across the entire platform.

🟠

Likely Case

Unauthorized users accessing sensitive project data, performing unauthorized API calls, and potentially escalating privileges within the system.

🟢

If Mitigated

Limited exposure if proper access controls and monitoring are in place, but credentials remain vulnerable to insider threats.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated access with minimal permissions (Viewer or Prompt Editor role). The vulnerability is exposed through normal API calls visible in developer tools.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit 8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc

Vendor Advisory: https://github.com/lunary-ai/lunary/commit/8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc

Restart Required: No

Instructions:

1. Update lunary to a version containing commit 8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc. 2. Verify the GET /projects endpoint no longer returns private API keys. 3. Rotate all exposed API keys immediately.

🔧 Temporary Workarounds

Temporary Access Restriction

all

Restrict access to the GET /projects endpoint or implement middleware to filter sensitive fields from responses.

🧯 If You Can't Patch

  • Immediately rotate all API keys exposed through the vulnerable endpoint
  • Implement strict network segmentation and monitor all API key usage for suspicious activity

🔍 How to Verify

Check if Vulnerable:

Authenticate as a user with Viewer or Prompt Editor role and call GET /projects API endpoint. Check if response contains private API keys.

Check Version:

Check lunary version in deployment configuration or via package manager (e.g., npm list lunary-ai/lunary)

Verify Fix Applied:

After patching, repeat the same API call and verify private API keys are no longer included in the response.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API key usage patterns
  • Multiple failed authentication attempts followed by successful API calls with different keys
  • API calls from unexpected user roles to sensitive endpoints

Network Indicators:

  • Excessive requests to GET /projects endpoint
  • Traffic patterns showing API key reuse across different projects

SIEM Query:

source="lunary" AND (endpoint="/projects" AND method="GET") | stats count by user_role, project_id

🔗 References

📤 Share & Export