CVE-2020-28638

9.8 CRITICAL

📋 TL;DR

CVE-2020-28638 is a critical authentication bypass vulnerability in Tomb's password handling. When pinentry-curses is used with a non-empty DISPLAY environment variable, Tomb incorrectly uses a warning message as the encryption key instead of the actual password, allowing attackers to decrypt protected files. This affects all Tomb users running versions 2.0 through 2.7.

💻 Affected Systems

Products:
  • Tomb
Versions: 2.0 through 2.7
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when using pinentry-curses with DISPLAY environment variable set (common in GUI terminal sessions).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

All encrypted files become accessible without authentication, exposing sensitive data to unauthorized users or attackers who can access the system.

🟠

Likely Case

Users who have configured Tomb with pinentry-curses and have DISPLAY set (common in GUI environments) will have their encrypted files protected with a predictable, known key instead of their actual password.

🟢

If Mitigated

If proper controls are in place (using pinentry-gtk/pinentry-qt or unsetting DISPLAY), the vulnerability is avoided and files remain properly encrypted.

🌐 Internet-Facing: LOW - This is a local authentication bypass requiring access to the encrypted files or system.
🏢 Internal Only: HIGH - Any user or process with access to the encrypted files can decrypt them using the known warning message as the key.

🎯 Exploit Status

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

Exploitation requires access to encrypted files but uses a known, predictable key derived from the warning message.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Tomb 2.8

Vendor Advisory: https://github.com/dyne/Tomb/issues/385

Restart Required: No

Instructions:

1. Update Tomb to version 2.8 or later. 2. Re-encrypt all existing tombs using the new version with proper passwords. 3. Destroy old vulnerable tomb files.

🔧 Temporary Workarounds

Use alternative pinentry

linux

Switch from pinentry-curses to pinentry-gtk or pinentry-qt which properly handle DISPLAY environment variable.

sudo apt-get install pinentry-gtk
sudo update-alternatives --config pinentry

Unset DISPLAY variable

linux

Clear DISPLAY environment variable before using Tomb to prevent the vulnerable code path.

unset DISPLAY
tomb [command]

🧯 If You Can't Patch

  • Immediately re-encrypt all tombs using a non-vulnerable configuration (alternative pinentry or unset DISPLAY)
  • Restrict access to tomb files and monitor for unauthorized decryption attempts

🔍 How to Verify

Check if Vulnerable:

Check Tomb version with 'tomb -v' and verify if between 2.0-2.7, and check if using pinentry-curses with DISPLAY set.

Check Version:

tomb -v

Verify Fix Applied:

After updating to Tomb 2.8+, create a test tomb and verify it cannot be opened with the warning message as password.

📡 Detection & Monitoring

Log Indicators:

  • Failed tomb operations with pinentry-curses warnings
  • Unexpected successful tomb opens

Network Indicators:

  • None - local vulnerability only

SIEM Query:

process.name='tomb' AND (event.action='open' OR event.action='close') AND NOT user.interactive=true

🔗 References

📤 Share & Export