Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-57802

CVE-2025-57802: Airlink Daemon Path Traversal Vulnerability

CVE-2025-57802 is a path traversal flaw in Airlink Daemon that allows attackers to create symbolic links to access sensitive host files. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2025-57802 Overview

CVE-2025-57802 is a symlink attack vulnerability in Airlink Daemon version 1.0.0. The Airlink Daemon interfaces with Docker and the Airlink Panel to provide secure access for controlling instances. An attacker with access to the affected container can create symbolic links inside the mounted /app/data directory. Because the container bind-mounts an arbitrary host path, these symlinks can point to sensitive locations on the host filesystem. When the application or other processes follow these symlinks, the attacker gains unauthorized read access to host files outside the container. The flaw is tracked as [CWE-61: UNIX Symbolic Link (Symlink) Following] and was patched in version 1.0.1.

Critical Impact

Attackers with container access can read arbitrary host files, breaching container isolation and exposing sensitive system data.

Affected Products

  • Airlink Daemon version 1.0.0
  • Deployments using bind-mounted host paths into Airlink containers
  • Airlink Panel instances connected to vulnerable daemons

Discovery Timeline

  • 2025-08-25 - CVE-2025-57802 published to the National Vulnerability Database (NVD)
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-57802

Vulnerability Analysis

The vulnerability resides in the file system route handler at src/routes/fileSystem.ts. The sanitizePath function attempted to prevent directory traversal by joining a base path with a user-supplied relative path and verifying the result remained within the base. This check did not account for symbolic links resolved at follow-time by downstream file operations.

Airlink containers bind-mount host paths into /app/data to expose instance data. An attacker writing into this directory can create a symlink whose target is an absolute path on the host, such as /etc/shadow or /root/.ssh/id_rsa. When the daemon later reads files through the file system API, the kernel transparently follows the link and returns host file contents to the requesting user.

Root Cause

The root cause is missing symlink validation prior to file access. The original sanitizePath used path.join and a string prefix check, neither of which inspects file metadata. Because the function returned the joined path without verifying it was a regular file, any symlink under /app/data was treated as a legitimate target.

Attack Vector

Exploitation requires low-privilege authenticated access to a container managed by the daemon. The attacker creates a symbolic link inside the mounted directory pointing to a sensitive host file, then issues a daemon request that reads or serves that path. The daemon follows the link and returns host filesystem content over the network.

typescript
// Patch from src/routes/fileSystem.ts (commit 5e6222dd)
const router = Router();

-const sanitizePath = (base: string, relativePath: string): string => {
-    const fullPath = path.join(base, relativePath);
+const sanitizePath = async (base: string, relativePath: string): Promise<string> => {
+    const fullPath = path.resolve(base, relativePath);
+
     if (!fullPath.startsWith(base)) {
         throw new Error('Invalid path: Directory traversal is not allowed.');
     }
+
+    try {
+        const stats = await fs.lstat(fullPath);
+        if (stats.isSymbolicLink()) {
+            throw new Error('Invalid path: Symlinks are not allowed.');
+        }
+    } catch (err: any) {
+        if (err.code !== 'ENOENT') { // Ignore "file not found", because we're creating it later
+            throw err;
+        }
+    }
+
     return fullPath;
};

Source: GitHub Commit 5e6222dd. The patch adds an fs.lstat check that rejects any path resolving to a symbolic link before file operations proceed.

Detection Methods for CVE-2025-57802

Indicators of Compromise

  • Unexpected symbolic links inside container bind-mounted directories such as /app/data whose targets resolve outside the mount.
  • Daemon API requests reading paths that ultimately return host file content (for example, /etc/passwd, /etc/shadow, SSH keys).
  • File access audit logs showing the daemon process opening sensitive host paths it would not normally touch.

Detection Strategies

  • Audit container volumes for symlinks whose readlink target is an absolute host path; flag any link traversing the mount boundary.
  • Enable Linux auditd rules on host files of interest and correlate access by the Airlink Daemon process identifier.
  • Inspect daemon HTTP access logs for read operations against unusual deep relative paths under /app/data.

Monitoring Recommendations

  • Monitor file system events on Airlink container mount sources for symlink(2) syscalls originating from container processes.
  • Track Airlink Daemon version inventory and alert on hosts still running version 1.0.0.
  • Alert when the daemon process reads files outside its expected working directories.

How to Mitigate CVE-2025-57802

Immediate Actions Required

  • Upgrade Airlink Daemon to version 1.0.1 or later on all hosts running the service.
  • Remove any existing symbolic links inside container bind-mounted directories that point outside the mount.
  • Rotate any credentials, keys, or secrets that may have been exposed if host filesystem access is suspected.
  • Restrict container access to trusted operators until patching is complete.

Patch Information

The fix is published in Airlink Daemon version 1.0.1. The patch in commit 5e6222dd rewrites sanitizePath to use path.resolve and adds an fs.lstat check that rejects symbolic links before any file operation is performed. See the GitHub Security Advisory GHSA-hrfv-wm8p-mg8m for advisory details.

Workarounds

  • Bind-mount narrowly scoped host directories instead of broad or arbitrary host paths into containers.
  • Run the daemon under a user account that lacks read permission on sensitive host files such as /etc/shadow and private keys.
  • Apply noexec and read-only flags where feasible on bind mounts and use user namespaces to remap container UIDs.
bash
# Upgrade Airlink Daemon to the patched release
cd /opt/airlinklabs/daemon
git fetch --tags
git checkout v1.0.1
npm ci --omit=dev
systemctl restart airlink-daemon

# Audit existing bind mounts for suspicious symlinks
find /var/lib/airlink/instances -xtype l -printf '%p -> %l\n'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.