Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-6759 Overview
CVE-2024-6759 affects the FreeBSD kernel's Network File System (NFS) client. When mounting a remote filesystem over NFS, the kernel does not sanitize remotely provided filenames for the path separator character (/). As a result, readdir(3) and related functions can return filesystem entries whose names contain additional path components. This creates a confused deputy problem that unprivileged local programs can be tricked into exploiting. The weakness is tracked as a path traversal issue [CWE-22] and is addressed in FreeBSD Security Advisory SA-24:07.nfsclient.
Critical Impact
A malicious NFS server can serve filenames containing / characters, causing well-behaved client-side utilities (such as file copy or backup programs) to read from or write to locations outside the intended source and destination directories.
Affected Products
- FreeBSD 13.3 (including patch levels p1–p4)
- FreeBSD 14.0 (including beta5, rc3, rc4-p1, and patch levels p1–p8)
- FreeBSD 14.1 (patch levels p1–p2)
Discovery Timeline
- 2024-08-12 - CVE-2024-6759 published to the National Vulnerability Database
- 2024-08-12 - FreeBSD Security Advisory SA-24:07.nfsclient released
- 2024-08-16 - NetApp Security Advisory ntap-20240816-0009 published
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-6759
Vulnerability Analysis
The FreeBSD NFS client accepts directory entries from the server without validating the content of the filename strings. POSIX filenames are expected to be opaque byte sequences that do not contain the path separator /. The NFS client passes the server-supplied names through to user space via readdir(3) and related interfaces without enforcing this invariant.
An application iterating over a directory on an NFS mount receives entries it treats as single filenames. If those entries actually contain embedded / characters, any subsequent path construction performed by the application resolves relative to a different directory than the caller intended. This is a classic confused deputy scenario: the client program holds the authority, but the attacker-controlled NFS server influences how that authority is applied.
Root Cause
The root cause is missing input validation on filesystem entries returned from a remote NFS server. The kernel trusts the remote server to produce well-formed, separator-free names and does not reject or sanitize entries containing /. The flaw is categorized under [CWE-22] (Improper Limitation of a Pathname to a Restricted Directory).
Attack Vector
Exploitation requires that a victim host mounts an NFS share controlled by an attacker, or that an attacker can tamper with NFS traffic in transit. The attacker configures the server to return directory entries whose names include path components such as ../../etc/passwd or subdir/target. When a privileged or trusted process on the client enumerates the directory and acts on the returned names, it operates on files outside the intended directory tree. The CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N reflects a network-reachable, low-complexity attack that affects confidentiality by exposing files outside the mount point to unintended readers or writers.
No verified public proof-of-concept code is published for CVE-2024-6759. See the FreeBSD Security Advisory SA-24:07 for the vendor's technical description.
Detection Methods for CVE-2024-6759
Indicators of Compromise
- Directory listings from NFS mounts that contain entries with embedded / characters, parent directory references (..), or unexpectedly long path-like names.
- Unexpected file reads or writes outside an NFS mount point by processes whose working set is normally confined to the mount (for example, backup agents, rsync, or file copy utilities).
- NFS servers in the environment that are not under the control of the operations team or that are reachable over untrusted network segments.
Detection Strategies
- Audit active NFS mounts on FreeBSD hosts and correlate server endpoints against an inventory of approved NFS servers.
- Monitor readdir output and file access telemetry from processes that enumerate NFS directories, flagging names that contain / or .. sequences.
- Review system call auditing records (auditd or equivalent) for file opens whose resolved paths escape the directory being enumerated.
Monitoring Recommendations
- Log and alert on new NFS mount events, especially mounts targeting hosts outside the trusted storage subnet.
- Capture NFS traffic metadata to identify directory responses containing abnormal filename payloads.
- Track FreeBSD kernel versions across the fleet to confirm that patched builds are deployed.
How to Mitigate CVE-2024-6759
Immediate Actions Required
- Apply the FreeBSD kernel update described in SA-24:07.nfsclient and reboot affected systems.
- Restrict NFS client connectivity to trusted servers on isolated network segments only.
- Review scripts and services that iterate over NFS directories and add defensive validation on filename components before using them in path operations.
Patch Information
FreeBSD has published fixes in the FreeBSD Security Advisory SA-24:07. The advisory lists patched releases for the 13.3, 14.0, and 14.1 branches. Downstream appliances using FreeBSD-derived code should also be reviewed; see the NetApp Security Advisory ntap-20240816-0009 for vendor-specific guidance.
Workarounds
- Unmount NFS shares from untrusted or unverified servers until the kernel patch is applied.
- Enforce network ACLs so that FreeBSD clients can only reach approved NFS server addresses and ports.
- Where feasible, require Kerberos (sec=krb5) authentication for NFS mounts to limit the ability of unauthorized hosts to impersonate legitimate servers.
# Check installed FreeBSD version and apply security updates
uname -rK
freebsd-update fetch
freebsd-update install
# Review and remove NFS mounts to untrusted servers
mount -t nfs
umount /path/to/untrusted/nfs/mount
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

