Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2026-55477 — v3

HIGHFix: MHSanaei/3x-ui@80e1687

CVE-2026-55477 is a high-severity (CVSS 7.2) CWE-73 vulnerability in github.com/mhsanaei/3x-ui/v3. A fix is available for github.com/mhsanaei/3x-ui/v3 — see the affected versions and patch details below.

Authenticated Arbitrary File Write via Database Import and Xray Log Path Manipulation

Also known asGHSA-jm48-m3rr-9hggGO-2026-6284
Published
Updated
Affected
2 pkgs
Patched
1 / 2
Exploits
None indexed
Exploitation data as of Oct 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-55477.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs48th percentile — riskier than 48% of all scored CVEsHighest risk
0.00%0.37%0.74%1.11%0.3%0.3%0.6%0.6%0.6%Jul 26Sep 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-55477 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 384,534 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🐹github.com/mhsanaei/3x-ui/v3🐹github.com/mhsanaei/3x-ui/v2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

An authenticated administrator can abuse the database import functionality to achieve arbitrary file write on the host by modifying Xray configuration values stored in the database. This can be leveraged to obtain code execution and persistent access as the user running Xray (including root when Xray is running as root).

Details

The database import functionality trusts attacker-controlled configuration values without sufficient validation.

An authenticated administrator can export the SQLite database, modify xrayTemplateConfig.log.access to point to an arbitrary file, and import the modified database back into the panel. The attacker can then inject controlled content into an inbound client's email field. When a connection is processed, Xray writes the attacker-controlled content to the configured access log path.

Because the log path is fully attacker-controlled, this behavior results in arbitrary file write as the user running Xray. Depending on the target file and service privileges, this can be used to obtain code execution and persistent host access.

PoC

  1. Authenticate as a panel administrator.
  2. Export the panel database.
  3. Modify xrayTemplateConfig.log.access to point to a writable target file (e.g. ~/.ssh/authorized_keys).
  4. Inject an attacker-controlled SSH public key into an inbound client's email field.
  5. Import the modified database.
  6. Trigger a connection through the modified inbound.
  7. Xray writes the attacker-controlled content to the specified file, allowing SSH access as the user running Xray.

A complete PoC is available and can be provided privately.

Impact

Type: Authenticated Arbitrary File Write -> Privilege Escalation / Code Execution

Any authenticated 3X-UI administrator can write attacker-controlled content to arbitrary files accessible by the Xray process. This allows compromise of the account running Xray and may lead to full host compromise depending on deployment configuration and service privileges.

In environments where Xray runs as root, successful exploitation results in persistent root access.

Patches

Fixed in v3.3.1.

resolveXrayLogPaths (internal/web/service/xray.go) now confines the Xray log.access and log.error paths to the panel's log folder: any configured value is reduced to its base filename under config.GetLogFolder(). Absolute paths (such as /etc/cron.d/... or ~/.ssh/authorized_keys) and .. traversal can no longer make Xray write outside the log folder, while "" and "none" continue to disable logging. The confinement is applied during Xray configuration generation, so it covers every way the template can be set — the database import and the built-in raw Xray configuration editor alike.

Workarounds

None other than upgrading. Until you can update to v3.3.1, restrict panel administrator access to fully trusted operators.

Notes

The underlying issue is the unrestricted log path rather than the database import alone: an administrator can set the same xrayTemplateConfig.log.access / log.error value directly through the built-in raw Xray configuration editor, which is why the fix hardens the value at configuration-generation time to cover every vector. The client email field is also independently validated (control characters, spaces, and slashes are rejected), which constrains what can be written into a log line; the reliable primitive is therefore arbitrary file write (creation, append, or corruption) at an attacker-chosen path, with code execution dependent on a suitable writable target and the privileges of the Xray process.

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/mhsanaei/3x-ui/v3all versions3.3.1go get github.com/mhsanaei/3x-ui/v3@v3.3.1
🐹Gogithub.com/mhsanaei/3x-ui/v2all versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/mhsanaei/3x-ui/v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/mhsanaei/3x-ui/v3 to 3.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-55477 is resolved across your whole dependency graph.

  3. Workarounds

    Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.

Frequently Asked Questions

# Summary An authenticated administrator can abuse the database import functionality to achieve arbitrary file write on the host by modifying Xray configuration values stored in the database. This can be leveraged to obtain code execution and persistent access as the user running Xray (including root when Xray is running as root). # Details The database import functionality trusts attacker-controlled configuration values without sufficient validation. An authenticated administrator can export the SQLite database, modify `xrayTemplateConfig.log.access` to point to an arbitrary file, and imp
O3 Security · Impact-Aware SCA

Is CVE-2026-55477 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2026-55477: v3 PrivEsc — Fixed in 3.3.1