CVE-2022-48682
Medium · 6.0CVSS
6.0
EPSS
0.2%
Published
Apr 26, 2024
CISA due date
—
Cloudanix analysis
A problem in a file cleanup tool can let someone who already has access to the computer delete any file they choose by using a timing trick.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Data Tampering
- Component
- Application
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
TOCTOU race condition in deletefiles allows arbitrary file deletion by replacing a target with a symlink between check and unlink operations.
Why it matters to the business
Local users or compromised processes can cause permanent data loss or disrupt system operations by deleting arbitrary files when fdupes runs.
How an attack unfolds
An attacker with local access creates a symlink to a sensitive target file, then invokes fdupes in a way that triggers the race window during duplicate deletion, causing the symlink target to be removed instead of the intended duplicate.
How to fix it
Upgrade adrianlopezroche/fdupes to the fixed commit 85680897148f1ac33b55418e00334116e419717f (version 2.2.0 or later) on all systems; rebuild packages from source or obtain updated distribution packages.
How to confirm the fix worked
Verify installed fdupes binary or source matches the fixed commit or version 2.2.0+; run fdupes against test directories containing symlinks to confirm only intended duplicates are removed.
Typical attack path
- Obtain local user or process execution context on the host
- Identify or create conditions where fdupes will process files in a shared directory
- Place a symlink pointing to the desired deletion target in the scan path
- Trigger or wait for fdupes execution to win the TOCTOU window and unlink the symlink destination
How to detect it
Review system logs and file access timestamps around fdupes execution for unexpected deletions of files outside the scanned directories; correlate with user activity or cron jobs invoking fdupes.
What your security team should do
- Upgrade fdupes to the fixed version immediately on all hosts that run it
- Audit scheduled jobs and user scripts that invoke fdupes and restrict execution to trusted directories
- Monitor for new fdupes releases and include the package in routine vulnerability scanning
The record
In deletefiles in FDUPES before 2.2.0, a TOCTOU race condition allows arbitrary file deletion via a symlink.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | fdupes | 0 | No fix |
| Debian:12 | fdupes | 0 | 1:2.2.1-1 |
| Debian:13 | fdupes | 0 | 1:2.2.1-1 |
| Ubuntu:16.04:LTS | fdupes | 0 | No fix |
| Ubuntu:18.04:LTS | fdupes | 0 | No fix |
| Ubuntu:20.04:LTS | fdupes | 0 | No fix |
| Ubuntu:22.04:LTS | fdupes | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | fdupes | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | fdupes | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | fdupes | 0 | No fix |
Related vulnerabilities
- CVE-2026-53613 util-linux is a random collection of Linux utilities. CWE-367
- CVE-2026-53612 util-linux is a random collection of Linux utilities. CWE-367
- CVE-2026-67693 An issue in gnutls v.3.8.13 allows an attacker to obtain sensitive information via… CWE-367
- CVE-2026-106451 yawkat LZ4 Java provides LZ4 compression for Java. CWE-367
- CVE-2026-86805 A time-of-check to time-of-use (TOCTOU) race condition in the dynamic loader (ld.so) of… CWE-367
- CVE-2026-68488 A Time-of-check Time-of-use (TOCTOU) race condition leading to insecure symlink following… CWE-367
- CVE-2026-87554 Race condition in Chromoting in Google Chrome on on Windows prior to 153.0.8010.36… CWE-367
- CVE-2026-87523 Race condition in DataTransfer in Google Chrome prior to 153.0.8010.36 allowed a remote… CWE-367