/

CVE-2026-67920

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-73) in Halo Migration Service

CVE-2026-67920

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-73

Impact:

Arbitrary File Manipulation and Potential Remote 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

A path-handling vulnerability in Halo 2.25.4 affects migration functionality that restores work directories and recursively copies files. If a remote attacker can influence migration paths or related file operations, the issue may allow arbitrary file manipulation and potentially code execution under the application's privileges.

Affected context

The vulnerability occurs in Halo's migration workflow, specifically around MigrationServiceImpl.restoreWorkdir() and org.springframework.util.FileSystemUtils.copyRecursively(). It becomes risky when remotely influenced path values are used for filesystem operations without sufficiently restricting destinations, validating canonical paths, or enforcing trusted source and target boundaries.

Exploit preconditions

  • Attack surface: Remote migration-related application functionality
  • Required access: Ability to reach the affected service and influence relevant migration inputs; the exact access level depends on deployment configuration
  • Trigger point: Work-directory restoration or recursive file-copy operations
  • Why exploitation is possible: Attacker-controlled path values may direct filesystem operations outside their intended working directory, potentially enabling unauthorized file writes or replacement

Why this happens

The underlying bug is improper control of externally influenced file names or paths, mapped to CWE-73. The insecure pattern occurs when application-supplied path components are combined with trusted filesystem locations and passed to recursive copy or restore routines without reliable canonicalization, containment checks, and strict destination validation. If written files are later loaded or executed by the application, path manipulation can expand into code execution.

Potential impact

  • An attacker may write or replace files within the application's permissions
  • Application configuration or migration data could be tampered with
  • Sensitive files may be overwritten, depending on filesystem permissions
  • The application could execute attacker-controlled code if affected files are subsequently loaded or executed
  • The host or service account could be compromised

General mitigation guidance

Mitigation generally focuses on reducing trust in path inputs and enforcing

filesystem boundaries before any copy or restore operation.

Common defensive patterns include:

  • Resolve and canonicalize source and destination paths before use
  • Enforce that resolved paths remain within an explicitly permitted directory
  • Reject traversal components, unexpected absolute paths, symbolic-link escapes, and ambiguous encodings
  • Prefer fixed, application-controlled destinations over user-selected filesystem paths
  • Apply strict allowlists for migration artifacts and file names
  • Run the service with least-privilege filesystem and operating-system permissions
  • Use isolated work directories and avoid executing restored files
  • Keep sensitive configuration and executable locations outside writable migration areas

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules for externally influenced values reaching file-copy, archive-extraction, restore, or path-resolution APIs
  • Code review checks for missing canonicalization, containment validation, symlink handling, and absolute-path rejection
  • Runtime logging of migration source and destination paths, with alerts for writes outside approved directories
  • Policy enforcement requiring approved path-validation helpers for filesystem operations
  • Tests using traversal sequences, absolute paths, symlinks, alternate separators, and encoding variations to verify boundary enforcement
  • Neutral automated code-review or software-composition tools that identify risky filesystem data flows

Sources

SourceLink
gist.github.comgist.github.com/unpredictable21/f05d4b57867a2e83a5f991ff542215b2
github.comgithub.com/halo-dev/halo
github.comgithub.com/halo-dev/halo/pull/4206

Frequently asked

questions

It may be remotely exploitable when an attacker can access the affected migration functionality and influence the paths or file sources used by the restoration workflow. Actual reachability depends on authentication, network exposure, and deployment controls.

The attacker generally needs access to the relevant remote service and a way to provide or influence migration-related path data. The effective impact is also constrained by the permissions of the Halo process.

Treat migration paths as untrusted, resolve them before use, and enforce that every resulting path remains inside a fixed, non-sensitive working directory. Restrict file types and run the service with least privilege.

Centralize secure path-validation logic, prohibit direct use of untrusted paths in filesystem APIs, test boundary and symlink cases, and enforce code-review and CI policies for file-operation data flows.

Find out what's already
exploitable in your codebase.