CVE-2021-39262

7.8 HIGH

📋 TL;DR

CVE-2021-39262 is an out-of-bounds memory access vulnerability in NTFS-3G's decompression function that can be triggered by a specially crafted NTFS image. Attackers could exploit this to cause denial of service, information disclosure, or potentially execute arbitrary code. Systems using NTFS-3G to mount NTFS filesystems are affected.

💻 Affected Systems

Products:
  • NTFS-3G
  • FUSE-based NTFS implementations
  • Linux distributions with NTFS-3G
Versions: All versions before 2021.8.22
Operating Systems: Linux, macOS, FreeBSD, Other Unix-like systems with FUSE
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerable when NTFS-3G is installed and used to mount NTFS filesystems. Many Linux distributions include NTFS-3G by default or as part of desktop environments.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to full system compromise if attacker can supply malicious NTFS image and trigger decompression.

🟠

Likely Case

Denial of service (system crash) or information disclosure from memory corruption when mounting malicious NTFS volumes.

🟢

If Mitigated

Limited impact if NTFS-3G is not used or if untrusted NTFS images are not mounted.

🌐 Internet-Facing: LOW - Requires mounting attacker-controlled NTFS filesystems, unlikely via typical internet services.
🏢 Internal Only: MEDIUM - Internal users could exploit via removable media or network shares containing malicious NTFS images.

🎯 Exploit Status

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

Exploitation requires attacker to provide malicious NTFS image and victim to mount it. Proof-of-concept code exists in advisory.

🛠️ 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. 2. For Linux distributions, use package manager: 'sudo apt update && sudo apt upgrade ntfs-3g' (Debian/Ubuntu) or 'sudo yum update ntfs-3g' (RHEL/CentOS). 3. Verify installation with 'ntfs-3g --version'.

🔧 Temporary Workarounds

Disable NTFS-3G mounting

linux

Prevent automatic mounting of NTFS filesystems using NTFS-3G

sudo systemctl disable ntfs-3g
sudo rm /usr/bin/mount.ntfs-3g

Mount with noexec option

linux

Mount NTFS filesystems with noexec to prevent code execution

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

🧯 If You Can't Patch

  • Restrict mounting of NTFS filesystems to trusted sources only
  • Implement filesystem monitoring for unexpected NTFS mount attempts

🔍 How to Verify

Check if Vulnerable:

Check NTFS-3G version: 'ntfs-3g --version | head -1' and compare to 2021.8.22

Check Version:

ntfs-3g --version | head -1

Verify Fix Applied:

Confirm version is 2021.8.22 or later: 'ntfs-3g --version | grep -q "2021.8.22\|2021.8.23\|2021.8.24" && echo "Patched"'

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing NTFS-3G crashes
  • System logs with segmentation faults in ntfs-3g process

Network Indicators:

  • Unusual network shares mounting NTFS volumes
  • SMB/CIFS connections to untrusted sources

SIEM Query:

process.name="ntfs-3g" AND event.action="segmentation fault"

🔗 References

📤 Share & Export