CVE-2021-33287

7.8 HIGH

📋 TL;DR

A heap buffer overflow vulnerability in NTFS-3G allows attackers to write to arbitrary memory or cause denial of service when reading specially crafted NTFS attributes. This affects systems using NTFS-3G to access NTFS filesystems, particularly Linux/Unix systems mounting Windows drives. The vulnerability requires access to mount or process malicious NTFS filesystems.

💻 Affected Systems

Products:
  • NTFS-3G
  • Tuxera NTFS-3G
  • Linux distributions with NTFS-3G packages
Versions: All versions before 2021.8.22
Operating Systems: Linux, Unix-like systems, macOS (via FUSE), BSD variants
Default Config Vulnerable: ⚠️ Yes
Notes: Systems automatically mounting NTFS drives (like USB sticks) are vulnerable by default. Windows systems are not affected as they use native NTFS drivers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Arbitrary code execution with the privileges of the user or process accessing the NTFS filesystem, potentially leading to full system compromise.

🟠

Likely Case

Application crash or denial of service when processing malicious NTFS filesystems, with potential for limited memory corruption.

🟢

If Mitigated

No impact if systems don't mount untrusted NTFS filesystems or have updated NTFS-3G.

🌐 Internet-Facing: LOW - Requires mounting NTFS filesystems from untrusted sources, which is uncommon for internet-facing systems.
🏢 Internal Only: MEDIUM - Internal users could exploit via USB drives or network shares containing malicious NTFS filesystems.

🎯 Exploit Status

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

Exploitation requires the attacker to provide a malicious NTFS filesystem that the victim mounts. Proof of concept code is publicly 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: sudo yum update ntfs-3g. 4. For source installations: Download from http://ntfs-3g.com and compile/install.

🔧 Temporary Workarounds

Disable automatic NTFS mounting

linux

Prevent automatic mounting of NTFS filesystems to block attack vectors

sudo systemctl mask udisks2
sudo umount /dev/sdX1 (for specific NTFS drives)
Edit /etc/fstab to remove NTFS entries

Mount NTFS as read-only

linux

Mount NTFS filesystems with read-only permissions to limit damage

sudo mount -t ntfs-3g -o ro /dev/sdX1 /mnt/ntfs

🧯 If You Can't Patch

  • Restrict access to mount NTFS filesystems to trusted users only
  • Implement strict controls on external media and network shares containing NTFS filesystems

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

ntfs-3g --version | head -1

Verify Fix Applied:

Verify version is 2021.8.22 or higher: ntfs-3g --version | grep -q '2021.8.22\|2021.8.23\|2021.8.24\|2021.9\|2021.10\|2021.11\|2021.12\|2022' && echo 'Patched'

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing NTFS-3G crashes
  • System logs with segmentation faults in ntfs-3g processes
  • Unexpected mount/unmount events of NTFS filesystems

Network Indicators:

  • Unusual SMB/CIFS connections preceding NTFS mount events
  • External media insertion logs followed by system instability

SIEM Query:

process_name:"ntfs-3g" AND (event_type:"crash" OR exit_code:139) OR (source:"/var/log/syslog" AND "ntfs-3g" AND "segmentation fault")

🔗 References

📤 Share & Export