CVE-2025-57802
Description
Airlink's Daemon interfaces with Docker and the Panel to provide secure access for controlling instances via the Panel. In version 1.0.0, an attacker with access to the affected container can create symbolic links inside the mounted directory (/app/data). 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 can gain unauthorized read access to host files outside the container. This issue has been patched in version 1.0.1.
Affected products
1Patches
11 file changed · +18 −5
src/routes/fileSystem.ts+18 −5 modified@@ -6,11 +6,24 @@ import { validateContainerId, validatePath, validateFileName } from '../utils/va 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; }; @@ -350,7 +363,7 @@ router.post('/fs/upload', async (req: Request, res: Response) => { // Create the base directory if it doesn't exist const baseDirectory = path.resolve(`volumes/${id}`); - const filePath = sanitizePath(baseDirectory, targetPath); + const filePath = await sanitizePath(baseDirectory, targetPath); const dir = path.dirname(filePath); try { @@ -412,7 +425,7 @@ router.post('/fs/create-empty-file', async (req: Request, res: Response) => { console.log(`Normalized target path: ${targetPath}`); const baseDirectory = path.resolve(`volumes/${id}`); - const filePath = sanitizePath(baseDirectory, targetPath); + const filePath= await sanitizePath(baseDirectory, targetPath); const dir = path.dirname(filePath); try { @@ -513,7 +526,7 @@ router.post('/fs/append-file', async (req: Request, res: Response) => { } const baseDirectory = path.resolve(`volumes/${id}`); - const filePath = sanitizePath(baseDirectory, targetPath); + const filePath= await sanitizePath(baseDirectory, targetPath); try { if (typeof content === 'string') {
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2News mentions
0No linked articles in our index yet.