Rsync Modules Accessible Without Authentication

An rsync daemon offers modules without authentication, so anyone who can reach it can list and download their contents and, where a module is writable, change them.

SeverityMedium
CVSS 3.15.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N Open in the calculator
CVSS 4.06.9 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-552: Files or Directories Accessible to External Parties
OWASP Top 10A01:2025 Broken Access Control
MITRE ATT&CKT1039 Data from Network Shared Drive
CategoryBroken Access Control

Description

The rsync daemon, normally on TCP 873, offers one or more modules (named directories) that can be used without a user name or password. In the daemon's rsyncd.conf, a module is protected only when it has an auth users list and a secrets file; without them, any client that can reach the service can use it, and a module set with read only = no also accepts uploads. Modules are often created for backups, website deployment or file replication between servers and left open on the assumption that the network is trusted.

An attacker who can reach the daemon can download the contents of open modules, which often include backups, website source code, configuration files, database dumps and private keys, and therefore credentials for other systems. Where a module is writable, they can also change or add files, for example altering a website's code or a backup that will later be restored, which can lead to code execution or data corruption elsewhere. How serious this is depends on the contents of the modules and whether they are writable.

The issue is confirmed by requesting the module list from the daemon with the rsync client, using an rsync:// address with no module name, which returns every module set to be listed, then listing or copying a module's contents without credentials. Unlisted modules can still be reached if their names are known or guessed. Scanners report it as rsync modules accessible without authentication.

Remediation

Require authentication and restrict access to the daemon:

  • Add auth users and a secrets file to every module that is not intended to be public, with the secrets file readable only by the daemon's account, and remove modules that are no longer used.
  • Use hosts allow to limit each module to the clients that need it, set read only = yes unless clients must write, and set list = no for modules that do not need to be advertised.
  • Restrict TCP 873 with host and network firewall rules, and block it at the perimeter.
  • Prefer rsync over SSH for transfers between servers, as the daemon protocol does not encrypt data in transit.
# /etc/rsyncd.conf [backups] path = /srv/backups auth users = backupuser secrets file = /etc/rsyncd.secrets read only = yes list = no # also add: hosts allow = (the addresses of the hosts that use this module)

Change any credentials found in files that were exposed. Confirm the fix by listing and accessing the modules from an unauthorised host without credentials and checking that access is refused.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Network Services Findings

Every Network Services finding