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



CVE-2026-55477

CVE-2026-55477: Authenticated Arbitrary File Write in MHSanaei 3X-UI via Database Import

Alon Barad
Alon Barad
Software Engineer

Aug 25, 2026·6 min read·31 visits

Executive Summary (TL;DR)

An authenticated administrator in 3X-UI versions prior to 3.3.1 can perform remote code execution with root privileges by manipulating Xray log file paths to target host files like authorized_keys.

MHSanaei 3X-UI is a web control panel for managing Xray-core servers. In versions prior to 3.3.1, an authenticated administrator can abuse database import functions or raw template config fields to overwrite or append to arbitrary files on the host filesystem. This is achieved by altering the Xray log configuration variables to target system files, leveraging logging components to inject payloads.

Vulnerability Overview

3X-UI is a web-based administration panel designed to manage protocols and configurations for Xray-core proxies. The platform exposes a management interface that allows administrators to define users, control ports, modify operational logs, and import pre-configured SQLite database files.

This architecture creates an attack surface if input verification mechanisms fail to restrict administrative modifications of critical backend files. In versions prior to 3.3.1, the application allows administrative users to write arbitrary data to unauthorized system locations by exploiting configuration options associated with the logging path parameters.

The specific vulnerability class is CWE-73: External Control of File Name or Path. Under specific deployment contexts, this behavior allows remote attackers with administrative credentials to execute arbitrary commands as the user executing the Xray daemon process, which frequently defaults to the root user.

Root Cause Analysis

The vulnerability stems from an inadequate validation routine within the log path resolution functionality implemented in the Go backend. When preparing configuration settings for execution by the underlying Xray daemon, the application processes log storage paths defined by parameters log.access and log.error.

Prior to version 3.3.1, the path validation relies on the resolveXrayLogPaths function located in the source file internal/web/service/xray.go. This function validates paths using Go's standard library check filepath.IsAbs(). If the validation check determines that a specified path is absolute, it returns early and allows the configured path to be utilized directly by the Xray configuration exporter.

This logic is flawed because it assumes that any user-submitted absolute path is safe and authorized for write operations. Because Xray is often deployed with highly elevated system privileges, the application-level logic fails to establish a secure sandbox boundary, letting the Xray daemon write logging outputs to system-sensitive files like /root/.ssh/authorized_keys or directory-specific execution logs.

Code Analysis

An inspection of the vulnerable implementation in internal/web/service/xray.go demonstrates the precise logical error. The function resolveXrayLogPaths iterates over user-controlled paths but bypasses processing when meeting an absolute path identifier.

// Vulnerable path validation loop in internal/web/service/xray.go
func resolveXrayLogPaths(logCfg json_util.RawMessage) json_util.RawMessage {
	// ...
	for key, trimmed := range parsed {
		if trimmed == "" || strings.EqualFold(trimmed, "none") {
			continue
		}
		if filepath.IsAbs(trimmed) {
			// Bypasses path correction if the input path is absolute.
			// This allows the configuration to use arbitrary targets on the host filesystem.
			continue 
		}
		// ...
	}
	// ...
}

The remediation commit 80e168787ed608e83a065033ee94c8bfc3025ce7 corrects this behavior by stripping directory information and confining the resulting base filename within the established log folder.

// Patched implementation in internal/web/service/xray.go
func resolveXrayLogPaths(logCfg json_util.RawMessage) json_util.RawMessage {
	if len(logCfg) == 0 {
		return logCfg
	}
	// ...
	for key, value := range parsed {
		trimmed := strings.TrimSpace(value)
		if trimmed == "" || strings.EqualFold(trimmed, "none") {
			continue
		}
		// Convert all paths to use standard forward slashes to prevent platform evasion
		base := path.Base(filepath.ToSlash(trimmed))
		if base == "" || base == "." || base == ".." || base == "/" {
			continue
		}
		// Force confinement into the designated system logging directory
		confined := filepath.Join(config.GetLogFolder(), base)
		if confined == trimmed {
			continue
		}
		parsed[key] = confined
		changed = true
	}
	// ...
}

The security fix replaces vulnerable pass-through behavior with strict validation. It normalizes paths to generic forward slashes using filepath.ToSlash() and then extracts the file's base name via path.Base(). The resulting string is explicitly combined with the authorized base directory returned by config.GetLogFolder(), blocking path traversal or absolute file path overrides.

Exploitation Methodology

To execute this attack, an actor must possess active administrative session cookies on the target 3X-UI application portal. This access is obtained through credential abuse, brute-force attacks, or session hijacking.

The attack sequence begins with the generation of a malicious SQLite database file. The attacker modifies the configuration values log.access or log.error in the settings database table, updating the path to direct log data into target configuration scripts, system directories, or credential databases on the host system.

The attacker then utilizes the database import feature to upload the modified file to the active 3X-UI panel. Once imported, the panel recreates the configuration template files used to control the Xray daemon. The target destination is now bound to the log writer.

To achieve persistent remote execution, the attacker registers a client inbound entry containing their public key string in the connection email field. When the attacker initiates a connection to the proxy port, the Xray process logs the connection attempt, writing the credential payload directly to the user-supplied path. The next SSH session launched with the matching private key establishes a remote shell context.

Impact Assessment

Successful exploitation of CVE-2026-55477 leads to immediate unauthorized file manipulation with the privileges of the Xray-core process. Because standard installations run the daemon process under the root account, the integrity of the host operating system can be fully compromised.

The severity of this issue is evaluated with a CVSS v3.1 score of 7.2 (High). The metric breakdown reflects high confidentiality, integrity, and availability impacts (C:H/I:H/A:H). However, the exploit path requires prior administrative privilege on the application panel (PR:H), reducing the base scoring compared to unauthenticated remote code execution chains.

The potential consequences extend beyond standard log file pollution. By appending commands to files in system startup paths, user profiles, or cron configuration templates, attackers can pivot from administrative control of the proxy panel to comprehensive, persistent root-level control of the underlying Linux host.

Remediation and Mitigation

Remediation requires upgrading the 3X-UI installation to version 3.3.1 or higher. This release integrates secure path confinement code, which automatically normalizes input configurations and blocks absolute paths.

If an immediate system upgrade is not viable, the following defensive configurations must be implemented to reduce the active attack surface:

  • Restrict access to the panel control port using network-level security controls such as host-based firewalls or network access lists.
  • Establish host-level execution constraints, restricting the Xray-core daemon to operate under a low-privilege system group instead of root.
  • Verify the integrity of the logging directories by executing database queries to identify anomalous configurations:
    SELECT * FROM settings WHERE key LIKE '%log%';

Additionally, security teams should implement logging and host monitoring solutions. System auditing frameworks must actively watch for unexpected write activity targeting /root/.ssh/ or standard scheduled task paths.

Technical Appendix

CVSS Score
7.2/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Affected Systems

3X-UI Control Panel
AttributeDetail
CWE IDCWE-73 (External Control of File Name or Path)
Attack VectorNetwork
CVSS v3.1 Score7.2
EPSS Score0.00615 (Percentile: 46.77%)
Exploit StatusPoC / Conceptual
CISA KEV StatusNot Listed
CWE-73
External Control of File Name or Path

Vulnerability Timeline

Official fix commit committed to repository
2026-06-12
GHSA security advisory published
2026-06-25
CVE identity assigned
2026-06-25

References & Sources

  • [1]GitHub Security Advisory (GHSA-jm48-m3rr-9hgg)
  • [2]NVD Vulnerability Details
  • [3]Official Fix Commit
  • [4]Secure Release (v3.3.1)

More Reports

•20 minutes ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
1 views•10 min read
•about 1 hour ago•GHSA-47W9-6R3F-938G
9.9

GHSA-47w9-6r3f-938g: Authorization Bypass and Host Root Command Execution in Canonical LXD and Incus

A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.

Alon Barad
Alon Barad
3 views•11 min read
•about 2 hours ago•GHSA-JPF8-86F3-WP38
9.9

CVE-2026-48752: Arbitrary Host File Read and Write via Templates Symlink in Canonical LXD and Incus

A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.

Amit Schendel
Amit Schendel
4 views•10 min read
•1 day ago•CVE-2026-12411
8.4

CVE-2026-12411: Cross-Guest Volume Hijack via DevLXD Device PATCH in Canonical LXD

CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-105769
9.3

CVE-2026-105769: Azure Entra ID Token Exfiltration in Kaniko via Unanchored ACR Hostname Regex

CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.

Amit Schendel
Amit Schendel
11 views•11 min read
•1 day ago•CVE-2026-62300
6.5

CVE-2026-62300: Uncontrolled Resource Consumption in filecoin-pin Daemon

CVE-2026-62300 is an uncontrolled resource consumption vulnerability (CWE-400) affecting the daemon mode of filecoin-pin in versions up to and including 1.1.0. The daemon implements the IPFS Pinning Service API to store content on Filecoin's Proof of Data Possession (PDP) service. Due to the absence of rate limits, concurrency caps, execution timeouts, and Directed Acyclic Graph (DAG) traversal limits, an authenticated user—or an unauthenticated user when authentication is disabled—can exhaust system resources via crafted POST /pins requests.

Amit Schendel
Amit Schendel
9 views•11 min read