CVE-2026-72773 in n8n
Summary
by MITRE • 08/11/2026
n8n before 2.31.5 and 2.32.x before 2.32.1 contain a path-confinement bypass in the @n8n/computer-use file-search (search_files) tool. A crafted search pattern can bypass the base-directory confinement check and expand to locations outside the configured directory, causing the tool to return the names and contents of arbitrary local files readable by the daemon's OS user. Any deployment where an actor can influence the tool's search input is affected.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 08/11/2026
The vulnerability in n8n versions prior to 2.31.5 and 2.32.x before 2.32.1 represents a critical path traversal flaw within the @n8n/computer-use file-search functionality. This issue stems from inadequate input validation and directory confinement mechanisms that fail to properly restrict file system access to the intended base directory. The vulnerability specifically affects the search_files tool which is designed to limit file operations to a configured directory but can be circumvented through carefully crafted search patterns. Attackers can exploit this weakness by constructing malicious search queries that bypass the intended directory boundaries, allowing them to traverse beyond the designated safe zone and access arbitrary files accessible to the daemon's operating system user account.
The technical implementation of this vulnerability resides in how the file-search tool processes user-supplied input patterns without adequate sanitization or validation of path traversal sequences. When an attacker provides a search pattern containing directory traversal elements such as ../ or ..\, the system fails to properly normalize or validate these inputs against the base directory restriction. This allows the tool to expand paths beyond the intended confinement, effectively breaking out of the designated safe directory and accessing files that should remain restricted. The flaw operates at the file system abstraction layer where path resolution occurs before access control checks are properly enforced, creating a window where malicious input can manipulate the directory traversal behavior.
The operational impact of this vulnerability is severe and affects any deployment where external actors can influence the search input parameters. This includes scenarios where n8n workflows are exposed to untrusted users or when automated processes accept user-supplied search terms without proper validation. The consequence allows attackers to retrieve file names and contents from arbitrary locations on the filesystem that are readable by the daemon process, potentially exposing sensitive configuration files, credentials, application data, or system information. The scope of compromise extends beyond just the immediate n8n installation to encompass any files accessible to the operating system user account under which the n8n daemon is running.
Organizations deploying affected versions of n8n should immediately upgrade to the patched releases 2.31.5 and 2.32.1 or later to address this vulnerability. The fix involves implementing proper path validation and normalization techniques that prevent directory traversal sequences from bypassing the base directory restrictions. Security controls should include input sanitization of all search parameters, enforcement of strict path resolution rules, and implementation of proper access control checks that validate each file system operation against the intended confinement boundaries. Additionally, organizations should review their n8n deployment configurations to ensure that daemon processes run with minimal required privileges and that sensitive data is not stored in directories accessible to the n8n service account.
This vulnerability aligns with common weakness enumerations such as CWE-22 Path Traversal and CWE-73 Relative Path Traversal, representing a classic access control bypass through improper input validation. From an adversarial perspective, this issue maps to ATT&CK technique T1083 File and Directory Discovery, where adversaries can enumerate file systems to identify sensitive information. The vulnerability demonstrates how seemingly benign functionality can become a critical security risk when proper input validation and access controls are not implemented in the file system operations. Organizations should implement comprehensive monitoring to detect unusual file access patterns that might indicate exploitation attempts against this type of path traversal vulnerability.