The vulnerability is a classic path traversal issue originating from an unauthenticated REST API endpoint in the AIT-Core's Binary Stream Capture (BSC) component. The root cause is the lack of input validation on user-supplied path parameters, specifically path and log_dir_path, which are used to construct file paths for logging.
The exploitation flow begins at the StreamCaptureManagerServer._add_logger_by_name function, which exposes a POST endpoint at /<name>/start. This endpoint accepts form data and passes it as keyword arguments to StreamCaptureManager.add_logger. An attacker can control the path and log_dir_path parameters in this request.
The StreamCaptureManager.add_logger function then takes these parameters. It uses the log_dir_path to determine the base directory for the log file, overriding the server's configured root_log_directory without any security checks.
Finally, the SocketStreamCapturer._get_log_file function constructs the full path to the log file. It uses os.path.join to combine the directory and path components. Because the components are not sanitized, an attacker can provide an absolute path (e.g., /etc/) or use .. sequences to traverse outside the intended log directory. The SocketStreamCapturer._get_logger function then uses this malicious path to create directories and append data to an arbitrary file on the filesystem, with the permissions of the ait-bsc process.
The patch mitigates this by adding multiple layers of validation: it blocks the log_dir_path parameter from the REST API, sanitizes the path parameter to remove traversal sequences, and adds a final validation step using os.path.realpath to ensure the final log file path is strictly within the configured root directory before any file operations occur.