/

CVE-2026-70460

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in rsync Symlink Handling Bug

CVE-2026-70460

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-59

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(8.1)

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 vulnerability in rsync can allow a malicious sender to redirect file writes outside the intended module root through symlinks in the module file tree. The issue becomes risky when --partial-dir or --backup-dir is used and an attacker can place or influence a symlink that the receiving process trusts.

Affected context

The vulnerability affects rsync deployments that receive files into a module root while using options such as --partial-dir or --backup-dir. It may arise when the module tree contains attacker-controlled or trusted symlinks and file-write operations resolve those links without sufficiently enforcing the intended root boundary.

Exploit preconditions

  • Attack surface: An rsync module receiving files from a potentially malicious sender
  • Required access: Ability to send or synchronize files to the affected module, plus the ability to place a symlink under the module root or exploit a pre-existing trusted symlink
  • Trigger point: File creation or update operations associated with partial transfers or backups
  • Why exploitation is possible: Symlink resolution can redirect writes outside the module root, allowing paths to escape the intended directory boundary

Why this happens

The underlying bug is insufficient confinement of filesystem writes when symlinks are present in a destination tree. Operations associated with partial files or backups may follow a symlink and resolve the target relative to a location outside the intended module root. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-59: Improper Link Resolution Before File Access describing the unsafe reliance on link resolution.

Potential impact

  • An attacker may overwrite files outside the intended module directory
  • Sensitive configuration or application files could be modified
  • Service availability may be disrupted through destructive file writes
  • Modified files could enable privilege escalation or code execution in another process
  • Integrity of backups, partial transfers, or synchronized data could be compromised

General mitigation guidance

Mitigation generally focuses on enforcing destination confinement independently of symlink state.

Common defensive patterns include:

  • Resolve and validate destination paths before writes, while rejecting paths that escape the authorized root
  • Avoid following untrusted symlinks during file creation, replacement, backup, and partial-transfer operations
  • Use filesystem APIs and flags that enforce directory-relative, no-follow, or beneath-root access where available
  • Restrict who can create or modify symlinks within module trees
  • Separate writable synchronization areas from sensitive operating-system and application paths
  • Run rsync services with the minimum filesystem permissions required for their function
  • Treat module contents and sender-controlled names as untrusted input

How teams detect issues like this

Detection approaches can include:

  • Static analysis for file operations that combine user-controlled paths with symlink-following behavior
  • Code review checks for missing canonical-path, root-boundary, or no-follow validation
  • Tests that place symlinks at destination, partial-transfer, and backup paths and verify that writes remain confined
  • Runtime auditing of rsync-created or modified files outside approved module directories
  • Policy enforcement that limits module write permissions and disallows symlinks where they are not required
  • Automated security review tools that flag path traversal and unsafe link-resolution patterns

Sources

SourceLink
github.comgithub.com/RsyncProject/rsync/releases/tag/v3.5.0
github.comgithub.com/RsyncProject/rsync/security/advisories/GHSA-w3xf-j2r2-gv4x
vulncheck.comvulncheck.com/advisories/rsync-path-traversal-via-partial-dir-backup-dir-symlink

Frequently asked

questions

Exploitability depends on the deployment. The sender generally needs write access to an affected module and a way to place or leverage a symlink in the module tree.

Not necessarily. A remote sender with permitted access to the receiving module may be able to trigger the vulnerable write behavior, although filesystem permissions and module configuration remain important constraints.

Ensure all destination writes remain beneath the authorized module root, reject unsafe symlink resolution, and apply least-privilege permissions to the rsync process.

Treat sender-controlled paths and module contents as untrusted, test filesystem-boundary behavior explicitly, restrict symlink creation, and monitor writes outside approved synchronization directories.

Find out what's already
exploitable in your codebase.