CVE-2026-41035: 
rsync vulnerability analysis and mitigation

Overview

CVE-2026-41035 is a use-after-free (UAF) vulnerability in rsync's receive_xattr() function, affecting rsync versions 3.0.1 through 3.4.1. The flaw was introduced in commit d724dd186 on 2008-03-07 and publicly disclosed on April 16, 2026, by researcher Przemyslaw Frasunek via the oss-security mailing list. The vulnerability arises when receive_xattr() passes a wire-supplied (untrusted) count to qsort() instead of the actual number of stored items, causing stale heap data to be sorted into the active xattr list and creating dangling pointers. It has a CVSS v3.1 base score of 7.8 (High) per NVD, and affects rsync on Linux (in specific configurations) and more broadly on non-Linux platforms such as FreeBSD and macOS (Github Advisory, Openwall OSS-Sec).

Technical details

The root cause is classified as CWE-130 (Improper Handling of Length Parameter Inconsistency) and CWE-805 (Buffer Access with Incorrect Length Value). In xattrs.c, the receive_xattr() function pre-allocates space for count xattr items read from the wire, but the loop that populates temp_xattr may skip items via continue (due to namespace filtering), resulting in temp_xattr.count < count. The subsequent qsort() call at line 864 incorrectly uses the wire-supplied count rather than temp_xattr.count, causing it to operate over stale rsync_xa structs from a prior file's xattr processing (since temp_xattr is a static variable). These stale entries — containing dangling pointers to previously freed heap allocations — are then persisted in the global rsync_xal_l list, enabling read-after-free, double-free, and free-of-allocated-memory conditions in rsync_xal_set() and recv_xattr_request(). On Linux, the bug is only triggered when need_sort is set (i.e., when using --fake-super or an xattr filter that passes non-user namespace xattrs); on FreeBSD/macOS, need_sort defaults to 1, making all -X configurations vulnerable (Openwall OSS-Sec, rsync Issue #871).

Impact

Successful exploitation can result in information disclosure (heap layout leaked via tcache metadata written as xattr values to destination files), denial of service (reliable receiver process crash via heap corruption or SIGSEGV), and potential remote code execution through heap state corruption. The vulnerability affects the rsync receiver process, meaning a malicious rsync sender can target any victim running rsync -X in a vulnerable configuration. On non-Linux platforms (FreeBSD, macOS), all deployments using -X are affected, broadening the attack surface significantly. IBM Cloud Pak for Data System is also listed as an affected product (Openwall OSS-Sec, IBM Advisory).

Exploitability

No public proof-of-concept exploit code is currently available; the oss-security disclosure provides a detailed technical analysis of exploitation primitives but stops short of providing runnable payloads or step-by-step reproduction instructions (Openwall OSS-Sec). There is no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.014% (very low probability of exploitation in the next 30 days), and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. The vulnerability requires user interaction (victim must invoke rsync with -X) and specific configuration conditions on Linux, limiting opportunistic exploitation (Github Advisory).

Exploitation steps

  1. Reconnaissance: Identify target systems running rsync with the -X (--xattrs) flag, particularly those using --fake-super, non-root configurations with xattr filters, or non-Linux platforms (FreeBSD, macOS) where all -X configurations are vulnerable.
  2. Set up malicious sender: Configure a malicious rsync server or act as a sender in a push/pull scenario where the attacker controls the sending side of the rsync transfer.
  3. Craft xattr payload for a priming file: Send a file with multiple extended attributes (including non-user namespace xattrs such as security.* or trusted.*) to populate the static temp_xattr array with exploitable rsync_xa structs at specific array indices.
  4. Craft xattr payload for the trigger file: Send a subsequent file with a wire-supplied xattr count higher than the number of xattrs that will pass the receiver's namespace filter, ensuring temp_xattr.count < count after filtering. This causes qsort() to operate over stale entries from the priming file.
  5. Trigger use-after-free: The stale rsync_xa structs (with dangling pointers to freed heap memory from the priming file) are sorted into the active portion of temp_xattr and stored in rsync_xal_l. When the receiver subsequently processes these entries in rsync_xal_set() or recv_xattr_request(), dangling pointers are dereferenced, enabling read-after-free, double-free, or heap metadata leakage.
  6. Achieve objective: Depending on heap state, the attacker may cause a denial of service (crash), leak heap layout information (tcache metadata written as xattr values), or — with further heap grooming — potentially achieve code execution (Openwall OSS-Sec, rsync Issue #871).

Indicators of compromise

  • Process: Unexpected SIGSEGV or crash of the rsync receiver process, particularly during transfers involving extended attributes (-X flag); core dumps from rsync with stack traces referencing receive_xattr(), qsort(), or rsync_xal_compare_names().
  • Logs: Rsync transfer logs showing abnormal termination or segmentation faults during xattr processing; repeated failed rsync sessions from the same sender IP.
  • File System: Unexpected extended attribute values on destination files containing binary/non-printable data (potentially tcache metadata such as safe-linked pointers or tcache keys leaked via lsetxattr).
  • Network: Rsync connections from untrusted or unexpected sender hosts, particularly those transferring files with non-user namespace extended attributes (e.g., security.*, trusted.*, system.*) to receivers running as non-root or with --fake-super.

Mitigation and workarounds

The fix was included in rsync 3.4.2, released April 28, 2026, which corrects the qsort() call in xattrs.c to use temp_xattr.count instead of the wire-supplied count (rsync Releases). Users should upgrade to rsync 3.4.2 or later immediately. As a workaround, avoid using the -X (--xattrs) flag if extended attribute transfer is not required, or restrict rsync access to trusted senders only. On Linux, avoiding --fake-super and not configuring xattr filters that pass non-user namespace xattrs reduces exposure. Red Hat has issued patches for RHEL 6 through 10 and OpenShift Container Platform via multiple errata (e.g., RHSA-2026:17481 for RHEL 8, RHSA-2026:19152 for RHEL 10); Ubuntu, SUSE, AlmaLinux, Fedora, Mageia, and openSUSE have also released updated packages (Red Hat Bugzilla).

Community reactions

The vulnerability was responsibly disclosed by Przemyslaw Frasunek via the oss-security mailing list on April 16, 2026, with a detailed technical write-up covering root cause, exploitation primitives, and a suggested one-line fix. The rsync project responded promptly, merging the fix (PR #875) and releasing rsync 3.4.2 within approximately 12 days of disclosure. The GitHub issue (#871) filed by a separate reporter (venglin) on April 15, 2026, independently identified the same crash on FreeBSD, corroborating the finding. Major Linux distributions including Red Hat, Ubuntu, SUSE, AlmaLinux, Fedora, and Mageia issued security advisories and updated packages within weeks of disclosure, reflecting broad industry attention to the vulnerability (Openwall OSS-Sec, rsync Releases, Red Hat Bugzilla).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

rsync: 3.2.7-1+deb12u5

Fixed

sid

rsync: 3.4.2+ds1-1

Fixed

trixie

rsync: 3.4.1+ds1-5+deb13u2

Fixed

RHEL / CentOS

Fixed

OpenShift

el8:openshift/ose-rhel-coreos-8-0:412.86.202608241157-0

Fixed

RHEL 8

:baseos:rsync-0:3.1.3-25.el8_10.src

Fixed

RHEL 9

:appstream:rsync-0:3.2.3-9.el9_0.5.src

Fixed

RHEL 10

rsync-0:3.4.1-2.el10_0.2.src

Fixed

Alpine

Fixed

edge

rsync: 3.4.1-r2

Fixed

v3.20

rsync: 3.4.1-r2

Fixed

v3.21

rsync: 3.4.1-r2

Fixed

v3.22

rsync: 3.4.1-r2

Fixed

v3.23

rsync: 3.4.1-r2

Fixed

Source: This report was generated using AI

Related rsync vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-119741HIGH8.7
  • rsync logorsync
  • rsync
NoYesNov 03, 2026
CVE-2026-70464HIGH8.7
  • rsync logorsync
  • rsync.src
NoYesAug 13, 2026
CVE-2026-70463HIGH8.6
  • rsync logorsync
  • cpe:2.3:a:google:cloud_sql_mysql
NoYesAug 13, 2026
CVE-2026-85091HIGH8.3
  • rsync logorsync
  • zlib-static
NoYesSep 03, 2026
CVE-2026-18743LOW2.5
  • rsync logorsync
  • popt-static
NoYesSep 01, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management