/

CVE-2026-53476

Severity:

CRITICAL RISK

(9.6)

Path Traversal (CWE-59) in assisted-migration-agent

CVE-2026-53476

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Write

CWE:

CWE-59, CWE-22

Impact:

Arbitrary File Write leading to Remote Code Execution

Severity:

CRITICAL RISK

(9.6)

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

A path traversal flaw in assisted-migration-agent allows an attacker on the same LAN to craft a malicious gzipped tarball that bypasses directory security checks and writes files to arbitrary locations on the appliance.

If successfully exploited, this uncontrolled file write can be leveraged to execute unauthorized code and gain high-impact control over the affected system.

Affected context

The vulnerability occurs in environments where assisted-migration-agent processes gzipped tarballs received over a network or migration interface.

It is relevant when:

  • The agent automatically accepts or processes tarball-based input from the local network.
  • The extraction logic does not fully normalize or validate file paths contained in the archive.
  • The target system has locations where dropped files can influence execution (e.g., scripts, configuration, or service binaries).

These conditions can be present in appliances or migration tooling that prioritize automation and convenience over strict path handling.

Exploit preconditions

  • Attack surface: Network-accessible assisted-migration-agent service on the local area network.
  • Required access: No authentication; the attacker must only be able to reach the service from the same LAN segment or allowed network zone.
  • Trigger point: Submission or delivery of a specially crafted gzipped tarball that the agent processes.
  • Why exploitation is possible: The archive extraction logic fails to safely handle path components such as ../ or absolute paths in tar entries, allowing files from the archive to be written outside the intended directory, bypassing directory and security checks.

Why this happens

The core issue aligns with CWE-59: Improper Link Resolution Before File Access and CWE-22: Path Traversal, where user-controlled path data from an archive is used directly in filesystem operations without robust canonicalization and enforcement of an allowed root directory.

Assisted-migration-agent trusts file names and paths within the gzipped tarball and uses them to create or overwrite files without consistently stripping dangerous components, resolving symbolic links safely, or verifying that the final resolved path remains within a designated safe directory.

This pattern turns what should be constrained data import into an arbitrary file write primitive, which attackers can chain into code execution by targeting paths that are executed or interpreted by the system.

Potential impact

  • Attacker-crafted files may be written outside the intended extraction directory.
  • System or application configuration files could be overwritten, altering security settings.
  • Executable scripts or binaries can be planted or replaced to run attacker-controlled code.
  • Service startup scripts or cron jobs may be modified to persist malicious behavior.
  • Sensitive application data or logs could be corrupted, deleted, or replaced.
  • The appliance may be fully compromised, allowing lateral movement within the network.

General mitigation guidance

Effective mitigation focuses on confining file operations and distrusting archive metadata:

  • Enforce strict path normalization for all archive entries and explicitly reject any paths containing .., absolute paths, or drive/root prefixes.
  • Resolve symbolic links in a controlled manner and ensure that the final canonical path always resides under a predetermined, immutable base directory.
  • Use high-level archive extraction APIs or helper routines that implement safe extraction semantics instead of rolling custom path handling.
  • Run the assisted-migration-agent under a minimal-privilege account with restricted filesystem permissions, so even if a write escapes the intended directory, impact is limited.
  • Treat migration input as untrusted by default: apply content validation, size limits, and strong authentication/authorization around the service where feasible.

How teams detect issues like this

Detection can combine code-level inspection and runtime monitoring:

  • Static analysis rules can flag uses of archive extraction routines where entry names are concatenated directly into filesystem paths without normalization or base-path enforcement.
  • Code review should look for tar/gzip extraction loops that do not explicitly validate paths, check for .. segments, or verify canonical paths against a single allowed directory.
  • Security test suites and fuzzers can include malicious tarballs with nested directories, symbolic links, absolute paths, and long path chains to identify unsafe extraction behavior.
  • Runtime monitoring and file integrity checks on critical directories can help detect unexpected writes or modifications originating from the migration agent process.

Sources

SourceLink
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-53476
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2487233
github.comgithub.com/kubev2v/assisted-migration-agent/pull/256

Frequently asked

questions

Exploitation typically requires access from the same local area network or a network segment that can reach the assisted-migration-agent service. Exposure over the broader internet would depend on how the service is deployed and whether it is directly reachable externally.

No. The described flaw is exploitable by an unauthenticated attacker as long as they can send a crafted gzipped tarball to the vulnerable service.

The safest approach is to implement safe archive extraction that normalizes and validates every entry path, rejects any path that escapes a configured base directory, and resolves symbolic links securely before performing file writes. Combining this with least-privilege execution of the service significantly reduces risk.

Standardize on hardened file-handling helpers that always enforce a trusted root directory, incorporate path canonicalization and validation, and avoid directly using user-controlled paths in file APIs. Integrate these patterns into code review checklists and enable static analysis rules that flag unsafe path and archive handling.

Find out what's already
exploitable in your codebase.