CVE-2024-12747
Medium · 5.6CVSS
5.6
EPSS
0.4%
Published
Jan 14, 2025
CISA due date
—
Cloudanix analysis
A timing flaw in a common file copying tool can let someone swap files in a way that leaks private data or gains extra access during transfers.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- High
- Impact
- Data Exposure
- Component
- Application
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in symbolic link handling allows an attacker to replace a regular file with a symlink during rsync processing, bypassing the default skip behavior and enabling symlink traversal that can expose file contents outside the intended transfer scope.
Why it matters to the business
Organizations relying on rsync for file synchronization face risk of unauthorized data exposure or privilege escalation on systems where the rsync process runs with elevated rights, potentially affecting backup integrity and sensitive data confidentiality.
How an attack unfolds
An attacker with local access observes or influences the rsync operation timing, replaces a targeted regular file with a symbolic link pointing outside the allowed directory at the precise moment rsync evaluates the path, causing the tool to follow the link and transfer or expose unintended files.
How to fix it
Upgrade rsync to a version that eliminates the race condition in symlink handling, enforce least-privilege execution for rsync processes, and consider command-line options that disable symlink following where operationally feasible.
How to confirm the fix worked
Compare installed rsync version against vendor advisories for the fix, review rsync configuration for symlink-related flags, and perform controlled tests that attempt symlink replacement during simulated transfers to confirm the bypass is no longer possible.
Typical attack path
- Identify rsync processes or scheduled sync jobs handling user-controlled directories
- Monitor file system activity to detect the window between path check and content access
- Atomically replace a regular file with a crafted symbolic link
- Trigger or wait for the rsync operation to process the replaced path
- Access or exfiltrate data reached through the traversed symlink
How to detect it
Review rsync log files and system audit logs for unexpected symlink creations or traversals during transfer windows, correlate with file modification timestamps around scheduled sync jobs, and inspect for processes that rapidly replace regular files with links in directories being synchronized.
What your security team should do
- Prioritize patching rsync across all systems that perform automated or privileged file synchronization
- Audit rsync usage and reduce privileges of associated service accounts
- Enable additional logging for symlink-related events during transfers
- Monitor EPSS and exploit maturity indicators for changes in this race condition
The record
A flaw was found in rsync. This vulnerability arises from a race condition during rsync's handling of symbolic links. Rsync's default behavior when encountering symbolic links is to skip them. If an attacker replaced a regular file with a symbolic link at the right time, it was possible to bypass the default behavior and traverse symbolic links. Depending on the privileges of the rsync process, an attacker could leak sensitive information, potentially leading to privilege escalation.
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 |
| Mageia:9 | rsync | 0 | 3.2.7-1.2.mga9 |
| SUSE:Enterprise Storage 7.1 | rsync | 0 | 3.2.3-150000.4.36.1 |
| 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.36.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.36.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.36.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.36.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.36.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
- CVE-2024-12085 A flaw was found in rsync which could be triggered when rsync compares file checksums. Also affects rsync
- CVE-2024-12087 A path traversal vulnerability exists in rsync. Also affects rsync
- CVE-2024-12088 A flaw was found in rsync. Also affects rsync
- CVE-2016-9840 inftrees.c in zlib 1.2.8 might allow context-dependent attackers to have unspecified… Also affects rsync
- CVE-2024-12084 A heap-based buffer overflow flaw was found in the rsync daemon. Also affects rsync
- CVE-2024-12086 A flaw was found in rsync. Also affects rsync
- CVE-2017-17433 The recv_files function in receiver.c in the daemon in rsync 3.1.2, and 3.1.3-development… Also affects rsync
- CVE-2017-16548 The receive_xattr function in xattrs.c in rsync 3.1.2 and 3.1.3-development does not… Also affects rsync