Cloudanix VulnDB

CVE-2024-12087

Medium · 6.5

CVSS

6.5

EPSS

2.3%

Published

Jan 14, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

File-copying software used on many servers can be tricked by a malicious source into placing harmful files in the wrong folders on your systems.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Tampering
Component
Application
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Path traversal in rsync stemming from insufficient symlink verification during --inc-recursive transfers; deduplication checks performed per file-list allow a malicious server to write files outside the client's intended destination directory.

Why it matters to the business

Attackers controlling an rsync server can place malicious or unauthorized files into arbitrary locations on client systems, risking code execution, configuration tampering, or data corruption across Linux distributions and enterprise environments that rely on rsync for file synchronization.

How an attack unfolds

An attacker hosts a malicious rsync server and waits for or lures a client into initiating a transfer with the default-enabled --inc-recursive option; crafted file lists containing symlinks combined with per-list deduplication bypasses cause the client to write attacker-controlled content to arbitrary paths on the client filesystem.

How to fix it

Upgrade rsync to a patched release that enforces proper symlink verification regardless of --inc-recursive; where upgrades are unavailable, disable --inc-recursive on clients, restrict rsync connections to trusted servers via network controls, and avoid synchronizing with untrusted endpoints.

How to confirm the fix worked

Confirm rsync binary version meets or exceeds the first patched release for each distribution; perform test transfers from controlled servers while monitoring for writes outside the destination directory; review rsync configuration to ensure --inc-recursive is not enabled against untrusted servers.

Typical attack path

  1. Host or compromise an rsync server that responds to client connections
  2. Ensure the client uses --inc-recursive (default for many rsync invocations)
  3. Return specially constructed file lists containing symlinks during incremental recursion
  4. Leverage missing symlink validation and per-list deduplication to write files outside the target directory

How to detect it

Review rsync client logs and system audit logs for connections to unexpected servers; inspect for files appearing in directories outside normal rsync destinations during transfer windows; correlate process execution of rsync with subsequent file-write events in atypical paths.

What your security team should do

  • Prioritize patching rsync on all affected systems as soon as fixed packages are released by vendors
  • Inventory and restrict rsync usage to only trusted internal servers
  • Implement network segmentation or firewall rules limiting outbound rsync traffic
  • Add monitoring for unexpected file creation during rsync operations

The record

A path traversal vulnerability exists in rsync. It stems from behavior enabled by the `--inc-recursive` option, a default-enabled option for many client options and can be enabled by the server even if not explicitly enabled by the client. When using the `--inc-recursive` option, a lack of proper symlink verification coupled with deduplication checks occurring on a per-file-list basis could allow a server to write files outside of the client's intended destination directory. A malicious server could write malicious files to arbitrary locations named after valid directories/paths on the client.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 rsync 0 3.1.3-21.el8_10
AlmaLinux:8 rsync-daemon 0 3.1.3-21.el8_10
AlmaLinux:9 rsync 0 3.2.5-3.el9
AlmaLinux:9 rsync-daemon 0 3.2.5-3.el9
AlmaLinux:9 rsync-rrsync 0 3.2.5-3.el9
Alpine:v3.18 rsync 0 3.4.0-r0
Alpine:v3.19 rsync 0 3.4.0-r0
Alpine:v3.20 rsync 0 3.4.0-r0
Alpine:v3.21 rsync 0 3.4.0-r0
Alpine:v3.22 rsync 0 3.4.0-r0
Debian:11 rsync 0 3.2.3-4+deb11u2
Debian:12 rsync 0 3.2.7-1+deb12u1
Debian:13 rsync 0 No fix
Debian:13 rsync 0 3.3.0+ds1-3
Debian:14 rsync 0 3.3.0+ds1-3
Mageia:9 rsync 0 3.2.7-1.2.mga9
SUSE:Enterprise Storage 7.1 rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Micro 5.1 rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise Micro 5.2 rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise Micro 5.3 rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Micro 5.4 rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Micro 5.5 rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 rsync 0 3.2.7-150600.3.8.1
SUSE:Linux Enterprise Server 12 SP5-LTSS rsync 0 3.1.3-3.22.1
SUSE:Linux Enterprise Server 15 SP3-LTSS rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise Server 15 SP4-LTSS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Server 15 SP5-LTSS rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 rsync 0 3.1.3-3.22.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 rsync 0 3.2.3-150000.4.33.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 rsync 0 3.2.3-150400.3.17.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 rsync 0 3.2.3-150400.3.17.1
SUSE:Manager Proxy 4.3 rsync 0 3.2.3-150400.3.17.1
SUSE:Manager Server 4.3 rsync 0 3.2.3-150400.3.17.1
Ubuntu:20.04:LTS rsync 0 3.1.3-8ubuntu0.8
Ubuntu:22.04:LTS rsync 0 3.2.7-0ubuntu0.22.04.3
Ubuntu:24.04:LTS rsync 0 3.2.7-1ubuntu1.1
Ubuntu:24.10 rsync 0 No fix
Ubuntu:24.10 rsync 0 3.3.0-1ubuntu0.1
Ubuntu:Pro:14.04:LTS rsync 0 3.1.0-2ubuntu0.4+esm1
Ubuntu:Pro:16.04:LTS rsync 0 3.1.1-3ubuntu1.3+esm3
Ubuntu:Pro:18.04:LTS rsync 0 3.1.2-2.1ubuntu1.6+esm1
openSUSE:Leap 15.6 rsync 0 3.2.7-150600.3.8.1
openSUSE:Tumbleweed rsync 0 3.4.1-1.1

Related vulnerabilities