tar-fs Flaw Exposes Ubuntu Servers
TL;DR: A critical path traversal vulnerability has been found in the `tar-fs` Node.js library on Ubuntu 22.04 LTS and 24.04 LTS. The flaw allows attackers to write or overwrite files outside the intended directory using a specially crafted tar archive, posing a significant security risk.
Key facts
- Category
- Cybersecurity
- Impact
- High
- Published
- Source
- Ubuntu Security Notices
Full summary
A critical path traversal vulnerability in the `tar-fs` Node.js library affects recent Ubuntu LTS releases, allowing attackers to write arbitrary files.
A significant security vulnerability, identified as CVE-2024-12905, has been discovered in `tar-fs`, a common Node.js library used for handling tar archives. The flaw is a path traversal vulnerability, which means the library does not properly validate or restrict file paths contained within a malicious tar file during the extraction process. An attacker could craft an archive with file paths like `../../etc/passwd` to navigate outside the intended destination folder. When an application using the vulnerable library processes this file, it could overwrite critical system files or write new ones in sensitive locations. The issue specifically affects systems running Ubuntu 22.04 LTS and the newer Ubuntu 24.04 LTS, both of which are popular choices for production servers.
This type of vulnerability poses a high risk to developers, security teams, and any organization running Node.js applications on the affected Ubuntu versions. Any service that accepts and processes user-uploaded or untrusted tar archives could be a vector for an attack. A successful exploit could lead to arbitrary code execution, denial of service, or a full system compromise. For example, an attacker could overwrite configuration files to change application behavior, inject malicious scripts, or replace system binaries to gain unauthorized access. Given the widespread use of both Node.js and Ubuntu LTS in modern infrastructure, the potential impact is broad, making immediate action a priority for system administrators.
Why it matters
The vulnerability allows attackers to write files anywhere on a server, potentially leading to full system compromise. It affects widely-used Ubuntu LTS releases, impacting a large number of production Node.js applications.
Business impact
Systems running vulnerable applications could be taken over by attackers, leading to data breaches, service outages, and reputational damage. The cost of remediation and recovery could be significant if a system is compromised.
⚡ Action needed
Users are advised to update their systems to apply the necessary security patches.
Action checklist
- 1Identify all systems running Ubuntu 22.04 LTS or 24.04 LTS.
- 2Audit your Node.js applications to determine if they use the `tar-fs` library.
- 3Run `sudo apt-get update && sudo apt-get upgrade` to install the latest security patches.
- 4Verify that the relevant packages have been updated to their fixed versions.
- 5Review system logs for any signs of unauthorized or suspicious file modifications.
Tags
Related on Notifire
Related stories
Primary source: Ubuntu Security Notices
