CVE-2020-7040

8.1 HIGH

📋 TL;DR

CVE-2020-7040 is a symlink attack vulnerability in storeBackup.pl that allows local users to create or manipulate the /tmp/storeBackup.lock file. This can lead to privilege escalation by tricking the backup script into overwriting sensitive files, or cause denial of service by blocking backup operations. Affected users are those running storeBackup versions through 3.5 on Unix-like systems.

💻 Affected Systems

Products:
  • storeBackup
Versions: through version 3.5
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where storeBackup is installed and uses the default /tmp/storeBackup.lock path.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation where an attacker gains root access by manipulating the lock file to overwrite critical system files.

🟠

Likely Case

Denial of service where local users create a lock file to block legitimate backup operations until manual intervention.

🟢

If Mitigated

Minimal impact if proper file permissions and secure temporary directory practices are implemented.

🌐 Internet-Facing: LOW - This is a local attack requiring shell access to the system.
🏢 Internal Only: MEDIUM - Local users with shell access can exploit this, but requires existing access to the system.

🎯 Exploit Status

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

Exploitation requires local shell access and knowledge of the system. Proof of concept involves creating symlinks or files in /tmp.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: storeBackup 3.6 and later

Vendor Advisory: http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00054.html

Restart Required: No

Instructions:

1. Download storeBackup version 3.6 or later from the official repository. 2. Replace the existing storeBackup.pl script with the patched version. 3. Verify the fix by checking the version or testing lock file creation.

🔧 Temporary Workarounds

Secure temporary directory usage

linux

Modify storeBackup.pl to use a secure temporary directory with proper permissions instead of /tmp

sed -i 's|/tmp/storeBackup\.lock|/var/run/storeBackup.lock|' /path/to/storeBackup.pl

Set restrictive permissions on lock file

linux

Ensure the lock file is created with restrictive permissions and owned by root

chmod 600 /tmp/storeBackup.lock
chown root:root /tmp/storeBackup.lock

🧯 If You Can't Patch

  • Restrict access to storeBackup.pl to trusted users only using file permissions
  • Monitor /tmp/storeBackup.lock for unauthorized creation or modification

🔍 How to Verify

Check if Vulnerable:

Check storeBackup version: storeBackup.pl --version | grep -E '3\.5|3\.[0-4]'

Check Version:

storeBackup.pl --version

Verify Fix Applied:

Verify version is 3.6 or later: storeBackup.pl --version | grep -E '3\.6|3\.[7-9]|[4-9]\.[0-9]'

📡 Detection & Monitoring

Log Indicators:

  • Failed backup operations due to lock file issues
  • Unauthorized file creation in /tmp directory

Network Indicators:

  • None - this is a local attack

SIEM Query:

process.name='storeBackup.pl' AND file.path='/tmp/storeBackup.lock' AND file.action='create'

🔗 References

📤 Share & Export