CVE-2024-12761

7.5 HIGH

📋 TL;DR

A Denial of Service vulnerability in the brycedrennan/imaginairy repository allows attackers to crash the server by sending invalid requests to the /api/stablestudio/generate endpoint. This affects all users of version 15.0.0, making the service unavailable until manually restarted.

💻 Affected Systems

Products:
  • brycedrennan/imaginairy
Versions: 15.0.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects deployments using the /api/stablestudio/generate endpoint. The vulnerability is present in the default configuration.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage requiring manual intervention to restart the server, potentially disrupting critical image generation workflows.

🟠

Likely Case

Intermittent service disruptions affecting all users until administrators notice and restart the server process.

🟢

If Mitigated

Minimal impact with proper request validation and monitoring in place to detect and block malicious requests.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malformed requests to the vulnerable endpoint, which is relatively simple to execute.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 15.0.1 or later

Vendor Advisory: https://huntr.com/bounties/282900f4-2498-42c4-8ce7-ba5368aaf035

Restart Required: Yes

Instructions:

1. Update imaginairy to version 15.0.1 or later using pip: pip install --upgrade imaginairy 2. Restart the server process to apply the fix.

🔧 Temporary Workarounds

Input Validation

all

Implement request validation middleware to reject malformed requests before they reach the vulnerable endpoint.

Rate Limiting

all

Apply rate limiting to the /api/stablestudio/generate endpoint to reduce the impact of DoS attempts.

🧯 If You Can't Patch

  • Implement a web application firewall (WAF) to block malformed requests to the vulnerable endpoint.
  • Monitor server processes and set up automated alerts for unexpected terminations to enable quick recovery.

🔍 How to Verify

Check if Vulnerable:

Check if imaginairy version is 15.0.0 by examining the installed package version.

Check Version:

pip show imaginairy | grep Version

Verify Fix Applied:

Verify that imaginairy version is 15.0.1 or later and test the /api/stablestudio/generate endpoint with malformed requests to ensure it no longer crashes.

📡 Detection & Monitoring

Log Indicators:

  • Server process termination with 'KILLED' output
  • Unusual number of requests to /api/stablestudio/generate
  • Error logs indicating malformed request handling

Network Indicators:

  • Spike in requests to the vulnerable endpoint
  • Unusual request patterns or malformed payloads

SIEM Query:

source="imaginairy.log" AND ("KILLED" OR "process terminated" OR "malformed request")

🔗 References

📤 Share & Export