CVE-2026-72571 in cast-localvideo
Summary
by MITRE • 08/10/2026
A path traversal vulnerability in mustafaakin/cast-localvideo (all versions) allows an unauthenticated remote attacker to read arbitrary files from the server. The app.js handler at lines 151-153 passes the user-supplied req.body.dir parameter directly to res.sendFile() without sanitization, enabling directory traversal via absolute paths or ../ sequences to read sensitive system files.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 08/10/2026
This vulnerability represents a critical path traversal flaw in the cast-localvideo application that affects all published versions. The issue stems from improper input validation within the application's file handling mechanism where user-supplied data is directly processed without adequate sanitization. The specific weakness occurs in the app.js file at lines 151-153 where the req.body.dir parameter is passed directly to the res.sendFile() function without any form of path validation or normalization. This design pattern creates an exploitable condition that allows remote attackers to manipulate file access requests through crafted directory traversal sequences.
The technical exploitation of this vulnerability leverages standard directory traversal techniques using sequences such as ../ or absolute paths to navigate beyond the intended file access boundaries. When an attacker submits a malicious request containing directory traversal sequences in the dir parameter, the application processes these inputs without validation, allowing access to files outside the designated directories. This creates a scenario where sensitive system files including configuration data, credential files, and other potentially confidential information can be retrieved by unauthenticated remote attackers. The vulnerability operates at the application layer and does not require any authentication credentials to exploit, making it particularly dangerous in publicly accessible environments.
From an operational impact perspective, this vulnerability presents significant security risks that could lead to unauthorized data access and potential system compromise. Attackers can leverage this weakness to extract sensitive information such as database connection strings, API keys, configuration files, and other system artifacts that may contain credentials or system information. The implications extend beyond simple file reading as the exposure of system configuration files could reveal network architecture details, application dependencies, and other intelligence that could be used for further exploitation. This vulnerability aligns with CWE-22 Path Traversal and represents a classic example of insufficient input validation leading to unauthorized access.
The attack surface for this vulnerability is extensive given that it affects all versions of the software and requires no authentication to exploit. Security practitioners should consider this weakness in relation to ATT&CK technique T1083 File and Directory Discovery as it enables attackers to enumerate system files and potentially identify additional vulnerabilities through reconnaissance activities. The remediation approach must focus on implementing proper input validation, path normalization, and restrictive file access controls that prevent traversal beyond intended directories. Organizations should implement strict parameter validation, use whitelist-based access control, and ensure that all user-supplied paths are properly sanitized before being processed by file system functions to prevent similar vulnerabilities in future deployments.
This vulnerability demonstrates the importance of secure coding practices and input validation in web applications. The flaw highlights how simple oversight in parameter handling can create severe security implications, particularly when dealing with file system operations. Implementing proper access controls, using secure file handling libraries, and conducting regular security code reviews are essential measures to prevent such vulnerabilities from being introduced into production systems. The incident underscores the critical need for developers to follow security best practices and adhere to established frameworks for preventing common web application vulnerabilities including those identified in OWASP Top Ten and NIST cybersecurity guidelines.