Join our Newsletter — 33% off our NHI Course
Home› Glossary› Governance, Ownership & Risk› NFS no_root_squash Misconfiguration
Governance, Ownership & Risk

NFS no_root_squash Misconfiguration

← Back to Glossary
By NHI Mgmt Group Updated October 20, 2026 Domain: Governance, Ownership & Risk

NFS no_root_squash misconfiguration is an export setting that lets remote root users keep root privileges on the mounted share. If attackers can access the export, they may write files as root, replace sensitive data, or plant authorised keys and binaries. Review exports, restrict trusted hosts, and avoid exposing writable shares to untrusted networks.

What this misconfiguration means in practice

NFS no_root_squash is dangerous because it preserves root privilege across the network boundary. That means a remote client that can mount the export may act as root on the shared path, which turns a file share into a high-trust administrative surface rather than a normal user workspace.

The setting matters most when the exported data is writable and reachable from systems or users that are not tightly controlled. In that case, the share can become a path for direct tampering, persistence, or privilege-backed modification of files that other systems later trust.

Why root retention on an export is risky

With root mapping disabled, the server does not downgrade remote root to an unprivileged account. That creates exposure whenever the share contains scripts, configuration files, automation inputs, or content that other hosts consume later. A single write can therefore become a broader trust break, especially in environments where NFS exports support operational workflows.

The core danger is not just file alteration, but authoritative file alteration. If an attacker reaches the export, they may be able to change ownership-sensitive content, plant SSH keys, replace binaries, or modify startup artefacts in ways that survive ordinary user-level cleanup.

This is why the issue often appears alongside broader Linux hardening guidance, where export policy, host trust boundaries, and filesystem permissions all need to be treated as part of one control surface. The same hardening mindset that protects local privilege boundaries also has to protect network file services.

How organisations assess exposure

Exposure review starts with identifying every NFS export, then checking which ones are writable, which client networks can reach them, and whether root squashing is disabled. The practical question is not only whether the export exists, but whether an attacker could reach it from an untrusted foothold or an over-trusted internal segment.

Administrators should also inspect the files and directories stored on the share. If the export holds scripts, config files, package content, deployment artefacts, or account bootstrap material, the impact of a root-capable write is much higher than on a simple data-only share.

Vendor documentation for the NFS server and the platform’s hardened baseline should be the source of truth for export syntax and platform-specific defaults. In parallel, inventory-driven review should confirm where the share is mounted, which hosts depend on it, and whether any downstream service implicitly trusts its contents.

Controls and safe operating patterns

The safest pattern is to avoid exposing writable exports to untrusted networks and to keep root squashing enabled wherever possible. If a workflow truly needs elevated access, the exception should be narrow, documented, and constrained to known hosts rather than applied broadly to an entire export set.

Access should be reduced to the minimum set of client hosts and subnets that genuinely need the share. Where feasible, pair that with stronger filesystem ownership discipline, read-only exports for consumers that do not need write access, and separate exports for administrative functions versus shared application data.

If root-squash exceptions cannot be removed immediately, compensating controls should reduce blast radius: limit network reachability, isolate the export on a trusted management segment, and monitor for unexpected changes to sensitive paths that should rarely be modified.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareNFS export hardening is a secure configuration issue for exposed servers and shared services.
CIS-6 — Access Control ManagementThe misconfiguration changes who can perform high-impact actions on the shared filesystem.
Recommendation — Harden NFS exports, disable unsafe root-equivalence patterns, and verify share settings against approved baselines. Limit which hosts and users can reach writable exports and remove unnecessary administrative access paths.
NIST SP 800-53 Rev 5CM-6 — Configuration SettingsThe term is fundamentally about a risky server-side configuration choice on an access control service.
AC-6 — Least Privilegeno_root_squash expands effective privilege on a network share beyond least-privilege intent.
Recommendation — Define and enforce approved NFS export settings, including root-squash behavior, as a managed configuration. Restrict privileged export behaviour so remote users cannot retain root-level authority on shared paths.
NIST CSF 2.0PR.AA-05 — Managed Access ControlThe issue changes access enforcement on a shared resource and weakens trust boundaries.
Recommendation — Apply managed access controls to NFS exports so only approved systems can obtain write access.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org