CVE-2024-9431
Executive Summary
CVE-2024-9431 is an improper privilege management vulnerability in Transformeroptimus SuperAGI version v0.0.14. The flaw allows any authenticated user to change the passwords of other users, leading to potential account takeover. With a CVSS score of 6.5 (Medium), this vulnerability poses a significant risk to the confidentiality and integrity of user accounts within the SuperAGI platform. No public proof-of-concept or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the SuperAGI Python package (PyPI). Users should verify the integrity of their installed package and monitor for updates from the official repository. The lack of a patch increases the risk of supply chain attacks if malicious actors exploit this flaw to compromise administrator accounts.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: High (I:H)
- Availability Impact: None (A:N)
The threat level is elevated due to the low complexity and the ability to compromise high-privilege accounts without user interaction.
Deep Dive & Mechanics
The vulnerability resides in the user management module of SuperAGI. After authentication, the application fails to enforce proper authorization checks when processing password change requests. Specifically, the endpoint responsible for updating user passwords does not verify that the requesting user has the necessary privileges to modify another user's account. This allows any authenticated user to craft a request targeting another user's ID and change their password, effectively taking over the account.
The root cause is a missing or insufficient role-based access control (RBAC) check in the backend API. The application likely uses a simple user ID parameter in the request body or URL, which can be manipulated by an attacker.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is assumed to be in the user management API endpoint. A typical vulnerable implementation might look like:
# Vulnerable code (v0.0.14)
@app.route('/api/user/change_password', methods=['POST'])
def change_password():
user_id = request.json.get('user_id')
new_password = request.json.get('new_password')
# Missing privilege check
update_user_password(user_id, new_password)
return jsonify({'status': 'success'})
A patched version would include an authorization check:
# Patched code (hypothetical)
@app.route('/api/user/change_password', methods=['POST'])
def change_password():
current_user_id = get_current_user_id()
target_user_id = request.json.get('user_id')
if current_user_id != target_user_id and not is_admin(current_user_id):
return jsonify({'error': 'Unauthorized'}), 403
new_password = request.json.get('new_password')
update_user_password(target_user_id, new_password)
return jsonify({'status': 'success'})
Exploitation & Lab Setup
Red Team
- Setup: Deploy SuperAGI v0.0.14 in a controlled environment. Create two user accounts:
attackerandvictim. - Authenticate: Log in as
attackerand obtain a valid session token. - Craft Request: Send a POST request to
/api/user/change_passwordwith the following JSON payload:{ "user_id": "victim_user_id", "new_password": "pwned123" } - Verify: Log out and attempt to log in as
victimwith the new password.
Blue Team
- Monitor Logs: Look for multiple password change requests from a single user targeting different user IDs.
- Audit Permissions: Review user roles and ensure that only administrators can change other users' passwords.
- Implement Rate Limiting: Restrict the number of password change requests per user per hour.
- Enable Alerts: Set up alerts for any password change on privileged accounts (e.g., admin).
Indicators of Compromise (IOCs)
- Network: Unusual POST requests to
/api/user/change_passwordwith varyinguser_idparameters. - Logs: Multiple password change events from the same IP address or user account.
- System: Unexpected password reset emails or notifications for users.
- File: Modified user database entries (e.g., password hashes changed without authorization).
Detection Engineering
YARA Rule
rule CVE_2024_9431_SuperAGI_Password_Change {
meta:
description = "Detects exploitation attempts of CVE-2024-9431 in SuperAGI"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-9431"
strings:
$s1 = "/api/user/change_password" ascii wide nocase
$s2 = "user_id" ascii wide nocase
$s3 = "new_password" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: SuperAGI Unauthorized Password Change Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects attempts to change another user's password in SuperAGI (CVE-2024-9431)
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: superagi
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/api/user/change_password'
condition: selection
falsepositives:
- Legitimate admin password changes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-9431 SuperAGI Unauthorized Password Change"; flow:to_server,established; content:"POST"; http_method; content:"/api/user/change_password"; http_uri; content:"user_id"; http_client_body; content:"new_password"; http_client_body; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the password change functionality for non-admin users if possible.
- Short-term: Implement proper authorization checks in the user management API. Ensure that only users with the appropriate role (e.g., admin) can change other users' passwords.
- Long-term: Upgrade to a patched version once released. Monitor the official SuperAGI repository for updates.
- Compensating Controls: Use a Web Application Firewall (WAF) to block requests to
/api/user/change_passwordwith suspicious patterns. Enable multi-factor authentication (MFA) for all accounts.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.