Summary
A DNS-failure handling flaw in rsync can cause hostname-based deny rules to be skipped instead of enforced. A remote attacker who can induce or influence DNS resolution failures may bypass module-level IP restrictions and access files in otherwise restricted module trees.
Affected context
The vulnerability occurs in rsync daemon deployments that use hostname-based hosts deny rules for module access control. It becomes risky when DNS resolution is unavailable, manipulated, or otherwise fails during rule evaluation, and the daemon treats the failed lookup as a reason to ignore the restriction rather than applying a secure default.
Exploit preconditions
- Attack surface: rsync daemon module access over the network - Required access: Ability to connect to an exposed rsync service and cause
or influence DNS resolution failures for hostnames used in deny rules
- Trigger point: Evaluation of hostname-based access controls during module
connection handling
- Why exploitation is possible: A failed hostname lookup causes the
applicable deny rule to be skipped, allowing the request to proceed without
the intended restriction
Why this happens
The underlying bug is an insecure error-handling decision in access control evaluation. When a hostname-based deny rule cannot be resolved, the logic fails open by treating the rule as non-applicable instead of preserving the restrictive policy. This behavior maps primarily to CWE-863, Incorrect Authorization, and is also related to CWE-636, Not Failing Securely, because an environmental lookup failure weakens authorization enforcement.
Potential impact
- An attacker may access restricted rsync module file trees
- Sensitive files or directory listings could be exposed
- Unauthorized users could retrieve data protected by hostname-based rules
- The incident could support further compromise if exposed files contain credentials or operational secrets
General mitigation guidance
Mitigation generally focuses on fail-closed authorization behavior and reducing reliance on fragile environmental lookups. Secure-by-default patterns include treating DNS failures as authorization failures, using validated IP-based or identity-based controls where practical, minimizing trust in attacker-influenced name resolution, and restricting rsync modules to the least data and privileges required. Network segmentation, narrow module exposure, and independent authentication or authorization layers can reduce impact when a name-resolution dependency is unavailable.
How teams detect issues like this
Detection can include static and dynamic review of access-control code for branches that allow requests after DNS or policy lookup errors. Code reviews should examine hostname-based deny and allow rules, error-handling defaults, and whether authorization decisions remain restrictive when dependencies fail. Operational monitoring can alert on DNS failures coinciding with successful access to protected modules, unexpected clients, or unusual file enumeration. Policy enforcement may require fail-closed authorization patterns and tests covering resolver outages and malformed lookup results.

