Arbitrary File Overwrite in rsync

rsync Updated 02 Oct 2025

Summary

02/08/2022
N/A
Yes i
High
7.4

CVE-2022-29154: An issue was discovered in rsync before 3.2.5 that allows malicious remote servers to write arbitrary files inside the directories of connecting peers. Affects rsync across 2 version ranges.

< 0e10163a9d984a8858f7d83b5c7b46889536aa96 < 3.2.4-r0

Fixed in 3.2.4-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

rsync is an open-source utility that provides fast and versatile file synchronization between remote and local systems. It is widely used for backup and mirroring purposes. However, a vulnerability has been discovered in versions prior to 3.2.5 that allows malicious remote servers to write arbitrary files inside the directories of connecting peers. This can lead to unauthorized access and potential compromise of sensitive data.

Vulnerability Detail

The vulnerability arises from insufficient validation of file names by the rsync client. While the server chooses which files/directories are sent to the client, the client does not perform adequate validation. As a result, a malicious rsync server or a Man-in-The-Middle attacker can overwrite arbitrary files in the rsync client target directory and its subdirectories. For example, an attacker could overwrite the .ssh/authorized_keys file, potentially granting unauthorized access to the system.

How To Fix

Minimum fixed version

3.2.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade rsync

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, users can implement a workaround by ensuring that they only connect to trusted rsync servers. By verifying the integrity and authenticity of the server, the risk of connecting to a malicious server can be reduced. Additionally, users can consider implementing additional security measures such as network segmentation and access controls to limit the impact of a potential attack.

Conclusion

The vulnerability in rsync prior to version 3.2.5 allows malicious servers to overwrite arbitrary files on the client's system. To mitigate this risk, it is crucial to upgrade to the latest version of rsync. Additionally, users should exercise caution when connecting to rsync servers and consider implementing additional security measures. For further support and assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for rsync →

Share this vulnerability

FAQ

rsync is an open-source utility that provides fast and versatile file synchronization between remote and local systems. It is commonly used for backup and mirroring purposes.

The vulnerability allows malicious rsync servers or Man-in-The-Middle attackers to overwrite arbitrary files in the rsync client target directory and its subdirectories. This can lead to unauthorized access and potential compromise of sensitive data.

To fix this vulnerability, it is recommended to upgrade to rsync version 3.2.5 or later. This version includes the necessary fixes to properly validate file names and prevent arbitrary file overwrites.

If upgrading to the latest version is not immediately feasible, users can implement a workaround by ensuring that they only connect to trusted rsync servers. By verifying the integrity and authenticity of the server, the risk of connecting to a malicious server can be reduced.

In addition to upgrading rsync and connecting to trusted servers, users can consider implementing network segmentation and access controls to limit the impact of a potential attack.

Related vulnerabilities

Recent vulnerabilities recorded for rsync.

How To Fix

Minimum fixed version

3.2.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade rsync

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback