CVE-2021-35267

7.8 HIGH

📋 TL;DR

A stack buffer overflow vulnerability in NTFS-3G versions before 2021.8.22 allows local attackers to execute arbitrary code or escalate privileges when the software runs with setuid-root permissions. This affects systems using NTFS-3G to access NTFS filesystems, particularly Linux/Unix systems where the software is installed with elevated privileges.

💻 Affected Systems

Products:
  • NTFS-3G
Versions: All versions before 2021.8.22
Operating Systems: Linux, Unix-like systems, macOS (if using NTFS-3G)
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when NTFS-3G is installed with setuid-root permissions, which is common in default installations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to root, allowing complete system compromise and persistence.

🟠

Likely Case

Local privilege escalation by authenticated users to gain root access on affected systems.

🟢

If Mitigated

Limited impact if NTFS-3G is not installed or runs without setuid permissions.

🌐 Internet-Facing: LOW - This is a local privilege escalation vulnerability requiring local access.
🏢 Internal Only: HIGH - Any user with local access to affected systems could potentially gain root privileges.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires local access and knowledge of the vulnerability. Public exploit details are available in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2021.8.22 and later

Vendor Advisory: https://github.com/tuxera/ntfs-3g/security/advisories/GHSA-q759-8j5v-q5jp

Restart Required: No

Instructions:

1. Update NTFS-3G to version 2021.8.22 or later using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt install ntfs-3g. 3. For RHEL/CentOS/Fedora: sudo yum update ntfs-3g or sudo dnf update ntfs-3g. 4. Verify the update completed successfully.

🔧 Temporary Workarounds

Remove setuid permissions

linux

Remove setuid-root permissions from NTFS-3G binaries to prevent privilege escalation.

sudo chmod u-s /usr/bin/ntfs-3g
sudo chmod u-s /usr/bin/lowntfs-3g

Disable NTFS-3G

linux

Temporarily disable NTFS-3G if not needed for system operation.

sudo chmod 000 /usr/bin/ntfs-3g
sudo chmod 000 /usr/bin/lowntfs-3g

🧯 If You Can't Patch

  • Remove setuid permissions from NTFS-3G binaries as temporary mitigation
  • Restrict local user access to systems with vulnerable NTFS-3G versions

🔍 How to Verify

Check if Vulnerable:

Check NTFS-3G version with: ntfs-3g --version | head -1

Check Version:

ntfs-3g --version | head -1

Verify Fix Applied:

Verify version is 2021.8.22 or later: ntfs-3g --version | grep -q '2021.8.22' && echo 'Patched' || echo 'Vulnerable'

📡 Detection & Monitoring

Log Indicators:

  • Failed privilege escalation attempts
  • Abnormal process execution by NTFS-3G binaries
  • Core dumps from ntfs-3g processes

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

process.name:"ntfs-3g" AND process.args:"setuid" OR process.parent.name:"ntfs-3g" AND process.name:"sh"

🔗 References

📤 Share & Export