CVE-2024-10273
📋 TL;DR
This vulnerability allows users with viewer roles in lunary-ai/lunary to modify models owned by other users due to missing privilege checks in the PATCH endpoint. It affects all deployments running version 1.5.0 of the lunary software, potentially allowing low-privilege users to alter critical AI model configurations.
💻 Affected Systems
- lunary-ai/lunary
📦 What is this software?
Lunary by Lunary
⚠️ Risk & Real-World Impact
Worst Case
Attackers could modify or delete critical AI models, corrupting production systems, causing data loss, or injecting malicious configurations that affect downstream applications.
Likely Case
Internal users with viewer access could accidentally or intentionally modify models they shouldn't, causing configuration drift, data integrity issues, and operational disruptions.
If Mitigated
With proper role-based access controls implemented, only authorized administrators can modify models, maintaining system integrity.
🎯 Exploit Status
Exploitation requires authenticated user with viewer role. The vulnerability is straightforward to exploit via API calls.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in commit 8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc and later versions
Vendor Advisory: https://github.com/lunary-ai/lunary/commit/8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc
Restart Required: Yes
Instructions:
1. Update to latest lunary version or apply commit 8ba1b8ba2c2c30b1cec30eb5777c1fda670cbbfc
2. Restart the lunary service
3. Verify role-based access controls are functioning correctly
🔧 Temporary Workarounds
Temporary API endpoint restriction
allBlock PATCH requests to /api/models endpoint for viewer roles using web server or API gateway rules
# Example nginx config:
location /api/models {
if ($http_x_user_role = "viewer") {
return 403;
}
}
🧯 If You Can't Patch
- Implement network segmentation to restrict viewer role users from accessing model management APIs
- Enable detailed audit logging for all model modification attempts and monitor for unauthorized changes
🔍 How to Verify
Check if Vulnerable:
Test if a user with viewer role can successfully PATCH to /api/models/{id} endpoint with another user's model ID
Check Version:
Check package.json or run: npm list lunary-ai/lunary
Verify Fix Applied:
Verify that viewer role users receive 403 Forbidden when attempting to PATCH models they don't own
📡 Detection & Monitoring
Log Indicators:
- PATCH requests to /api/models from users with viewer role
- Successful model modifications from non-owner accounts
Network Indicators:
- Unusual PATCH request patterns to model endpoints
- Model modification requests from unexpected IP addresses
SIEM Query:
source="lunary" AND (method="PATCH" AND path="/api/models/*") AND user_role="viewer"