/

CVE-2026-92748

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Empire Upload Endpoints

CVE-2026-92748

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Potential Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

BC Security Empire does not adequately validate multipart filename values in upload endpoints, allowing authenticated operators to use path traversal sequences to escape intended directories.

This may let an attacker write malicious or otherwise sensitive files to arbitrary locations on the C2 server, potentially enabling code execution depending on file type, permissions, and server behavior.

Affected context

The vulnerability occurs in Empire deployments that expose upload functionality and use client-supplied multipart filename values to determine server-side file paths. It becomes risky when an authenticated operator can submit filenames containing traversal elements and the application does not reliably canonicalize paths or enforce containment before writing.

Exploit preconditions

  • Attack surface: Multipart upload endpoints on the Empire C2 server
  • Required access: Valid authentication with permissions to use the affected upload functionality
  • Trigger point: Server-side handling of the multipart filename during file creation
  • Why exploitation is possible: Insufficient filename validation may allow traversal sequences to bypass the intended upload directory and redirect writes to other filesystem locations

Why this happens

The underlying bug is improper limitation of a user-controlled file path, which maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

The insecure pattern occurs when an application derives a filesystem destination from a multipart filename without treating the value as untrusted path input. If canonicalization, containment checks, and safe filename handling are incomplete or performed in the wrong order, attacker-controlled path components can escape the designated storage directory.

Potential impact

  • An attacker may overwrite application or operating-system files accessible to the service account.
  • Malicious files could be placed where the C2 server may load, execute, or serve them.
  • The vulnerability could enable code execution under the privileges of the Empire process.
  • Sensitive files may be damaged, replaced, or made unavailable.
  • The C2 server could be used as a foothold for further compromise.

General mitigation guidance

Mitigation generally focuses on removing client control over filesystem destinations and enforcing defense-in-depth around uploads.

Common defensive patterns include:

  • Generate server-side filenames and ignore directory components supplied by clients.
  • Canonicalize candidate paths and require them to remain within a dedicated upload directory.
  • Apply strict allowlists for permitted filename characters and file types.
  • Store uploads outside executable or application-controlled directories where practical.
  • Use least-privilege service accounts and restrictive filesystem permissions.
  • Treat uploaded content as untrusted and apply independent validation before processing or serving it.
  • Enforce request authorization and audit upload activity.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify filesystem writes built from multipart or request-derived filename values.
  • Code review checks for missing canonicalization, containment validation, or server-generated filenames.
  • Tests that submit traversal-oriented filenames and verify that writes remain inside the intended directory.
  • Runtime monitoring for uploads followed by writes outside approved storage paths.
  • File-integrity monitoring on application, configuration, and executable directories.
  • Policy enforcement requiring dedicated upload directories, non-executable storage, and least-privilege filesystem access.

Automated security review tools may help identify path construction and unchecked file-write patterns, but findings should be validated against deployment-specific behavior.

Sources

SourceLink
github.comgithub.com/BC-SECURITY/Empire
github.comgithub.com/BC-SECURITY/Empire/blob/v6.6.0/empire/server/core/download_service.py#L148-L193
github.comgithub.com/BC-SECURITY/Empire/commit/c33a626316cb20bc8ed707e03a22d324d5d4762a
github.comgithub.com/BC-SECURITY/Empire/issues/824
github.comgithub.com/BC-SECURITY/Empire/releases/tag/v6.7.1
vulncheck.comvulncheck.com/advisories/bc-security-empire-before-6.7.1-path-traversal-file-upload-rce

Frequently asked

questions

It may be exploitable through the Empire upload interface when that endpoint is reachable and the attacker has valid operator authentication and sufficient upload permissions.

The described issue requires authenticated operator access. The practical impact also depends on the service account's filesystem permissions and which locations can be reached.

Use server-generated filenames, store uploads in a dedicated non-executable directory, and enforce canonical path containment before any filesystem write.

Treat all upload metadata as untrusted, apply strict authorization and input validation, use least-privilege filesystem permissions, and add traversal-focused tests and monitoring to the development and deployment processes.

Find out what's already
exploitable in your codebase.