CVE-2021-3178
kernel: path traversal in fs/nfsd/nfs3xdr.c may lead to Information Disclosure or RCE
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 19, 2021
Updated · June 28, 2026
Description
A flaw leak of the file handle for parent directory in the Linux kernel's NFS3 functionality was found in the way user calls READDIRPLUS. A local user could use this flaw to traverse to other parts of the file-system than mounted sub-folder.
Statement
This flaw is rated as having Moderate impact because of the attack limitation: the user can gain more access than expected only inside NFS root mount point if already have permissions for the access to this NFS sub-folder.
Also this is a known limitation of NFSv3 and there is a known and documented configuration option to avoid this. As such, this is more of an hardening rather than security issue.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
When export subdirectory of a filesystem, enable subtree_check option of the NFS server for preventing possibility of accessing outside of this export.
CVSS / CWE
CVSS 3.1 · 5.7CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')