cve.bz

CVE-2021-3178 Path traversal

6.5 mediumEPSS 2.4%Fix available

Medium (6.5). EPSS 2.4% estimated probability of exploitation activity in the next 30 days.

On this page
fs/nfsd/nfs3xdr.c in the Linux kernel through 5.10.8, when there is an NFS export of a subdirectory of a filesystem, allows remote attackers to traverse to other parts of the filesystem via READDIRPLUS. NOTE: some parties argue that such a subdirectory export is not intended to prevent this attack; see also the exports(5) no_subtree_check default behavior

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
EPSS
2.4% (unchanged from 2.4% a week ago; 2.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-3178 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-3178?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-3178?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-3178 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
linux:linux_kernelthrough 5.10.8
fedoraproject:fedora33
debian:debian_linux9.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9linux4.9.258-1DLA-2586-1
Debian12, 13, 14linux5.10.12-1DEBIAN-CVE-2021-3178
Ubuntu16.04:LTSlinux4.4.0-204.236UBUNTU-CVE-2021-3178 USN-4876-1
Ubuntu16.04:LTSlinux-aws4.4.0-1123.137UBUNTU-CVE-2021-3178 USN-4876-1
Ubuntu16.04:LTSlinux-aws-hwe4.15.0-1095.102~16.04.1UBUNTU-CVE-2021-3178 USN-4877-1
Ubuntu16.04:LTSlinux-azure4.15.0-1109.121~16.04.1UBUNTU-CVE-2021-3178 USN-4877-1
Ubuntu16.04:LTSlinux-gcp4.15.0-1094.107~16.04.1UBUNTU-CVE-2021-3178 USN-4877-1
Ubuntu16.04:LTSlinux-hwe4.15.0-137.141~16.04.1UBUNTU-CVE-2021-3178 USN-4877-1
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2021-3178
Ubuntu16.04:LTSlinux-kvm4.4.0-1089.98UBUNTU-CVE-2021-3178 USN-4876-1
Ubuntu16.04:LTSlinux-oracle4.15.0-1066.74~16.04.1UBUNTU-CVE-2021-3178 USN-4877-1
Ubuntu16.04:LTSlinux-raspi24.4.0-1147.157UBUNTU-CVE-2021-3178 USN-4876-1
Ubuntu16.04:LTSlinux-snapdragon4.4.0-1151.161UBUNTU-CVE-2021-3178 USN-4876-1
Ubuntu18.04:LTSlinux4.15.0-137.141UBUNTU-CVE-2021-3178 USN-4877-1
48 more for Ubuntu in the JSON and on Ubuntu's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's 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.

Red Hat's mitigation

When export subdirectory of a filesystem, enable subtree_check option of the NFS server for preventing possibility of accessing outside of this export.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernel-altOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelAffected
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-3178.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON