CVE-2024-8953

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote code execution through the mathematical_calculator endpoint in composiohq/composio version 0.4.3. Attackers can execute arbitrary code by passing malicious input to the unsafe eval() function. Anyone using the vulnerable version of this software is affected.

💻 Affected Systems

Products:
  • composiohq/composio
Versions: 0.4.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any deployment using the mathematical_calculator endpoint with version 0.4.3 is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Remote code execution leading to data exfiltration, service disruption, or lateral movement within the network.

🟢

If Mitigated

Limited impact if input validation and sanitization are properly implemented before reaching the eval() function.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation is straightforward due to the direct use of eval() with user input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.4.4 or later

Vendor Advisory: https://huntr.com/bounties/8203d721-e05f-4500-a5bc-c0bec980420c

Restart Required: Yes

Instructions:

1. Check current version: pip show composio
2. Upgrade: pip install --upgrade composio>=0.4.4
3. Restart the application/service

🔧 Temporary Workarounds

Disable mathematical_calculator endpoint

all

Temporarily disable or block access to the vulnerable endpoint

Configure web server/application firewall to block /mathematical_calculator endpoint

Input validation filter

all

Implement strict input validation to only allow mathematical expressions

Add regex validation: ^[0-9\+\-\*\/\(\)\.\s]+$

🧯 If You Can't Patch

  • Implement strict input validation and sanitization before eval()
  • Use a safe math evaluation library instead of eval()

🔍 How to Verify

Check if Vulnerable:

Check if composio version is 0.4.3 and mathematical_calculator endpoint is accessible

Check Version:

pip show composio | grep Version

Verify Fix Applied:

Verify version is 0.4.4 or later and test endpoint with safe mathematical input only

📡 Detection & Monitoring

Log Indicators:

  • Unusual eval() errors
  • Suspicious mathematical_calculator endpoint requests with non-numeric characters
  • System command execution in logs

Network Indicators:

  • Requests to /mathematical_calculator with encoded payloads
  • Outbound connections from composio process to unexpected destinations

SIEM Query:

source="composio" AND (endpoint="/mathematical_calculator" AND NOT input~"^[0-9+\-*/()\s.]*$")

🔗 References

📤 Share & Export