CVE-2026-134834 in Tandoor Recipes
Summary
by MITRE • 11/23/2026
Tandoor Recipes before 2.7.4 contains a path traversal vulnerability in Nextcloud.get_file that allows authenticated recipe editors to write and delete files by using unsanitized recipe names in temporary paths. Attackers can set a recipe name containing ../ segments via PATCH /api/recipe/<pk>/ and request /api/get_recipe_file/<pk>/ to overwrite and remove .pdf files outside the temporary directory.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in Tandoor Recipes prior to version 2.7.4 represents a critical path traversal flaw within the application's file handling mechanisms, specifically affecting the Nextcloud integration endpoint responsible for retrieving recipe-related files. This security defect stems from insufficient input validation and sanitization of user-supplied data during the processing of HTTP PATCH requests used to update recipe metadata. When an authenticated user with editor privileges submits a request to modify a recipe via the /api/recipe/<pk>/ endpoint, they can inject directory traversal sequences such as ../ into the recipe name field. This unsanitized input is subsequently utilized in constructing temporary file paths without adequate checks to ensure that the resulting path remains confined within the intended application directories.
The technical exploitation of this flaw allows an attacker to manipulate the filesystem structure by directing file operations outside the designated sandboxed environment. By crafting a malicious PATCH request with a recipe name containing relative path traversal sequences, and then triggering the retrieval process via /api/get_recipe_file/<pk>/, the underlying system resolves these paths incorrectly. This misresolution enables the application to write or delete files in arbitrary locations on the server's filesystem where the web service user has permissions. The impact is particularly severe because it allows for the overwriting of existing critical files, such as PDF documents stored outside the temporary directory, effectively leading to data integrity compromise and potential remote code execution if executable scripts are targeted.
From an operational perspective, this vulnerability undermines the confidentiality, integrity, and availability guarantees provided by the application's access controls. Although authentication is required, the ability for any authenticated editor to traverse directories and overwrite system or user files significantly escalates the risk profile of a standard user account. An attacker could use this capability to replace legitimate configuration files, inject malicious content into existing documents, or delete essential data, thereby disrupting service availability or facilitating further attacks such as server-side request forgery if specific file types are processed by other backend services. The lack of strict canonicalization and boundary enforcement in the path construction logic is the root cause, reflecting a common oversight in web application development where user input is directly concatenated into filesystem paths without rigorous validation against allowed character sets or directory boundaries.
This vulnerability aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, which describes flaws where software does not properly neutralize special elements within file names that can cause files to be located outside of the intended restricted directory. Furthermore, in terms of adversary behavior mapping, this exploit technique corresponds to ATT&CK T1083: File and Directory Discovery combined with T1564: Hidden Files and Directories or more broadly T1222: File Permission Modification if used for altering access rights, though the primary mechanism here is unauthorized file system manipulation. The exploitation relies on the application's trust in user-supplied metadata to dictate safe operational boundaries, a pattern that violates the principle of least privilege and secure defaults.
To mitigate this vulnerability, immediate patching to version 2.7.4 or later is required as it addresses these input validation gaps. In environments where upgrading is not immediately feasible, administrators should implement strict allow-lists for recipe name characters, rejecting any input containing path traversal sequences such as dots followed by slashes. Additionally, enforcing canonicalization of file paths before use and ensuring that all file operations are restricted to a predefined root directory using chroot or similar sandboxing techniques can provide defense in depth. Input validation must be applied at multiple layers, including the API gateway level and within the application logic itself, to ensure that no unsanitized user input influences filesystem navigation decisions. Regular security audits focusing on path traversal risks in file handling modules are also recommended to prevent recurrence of such issues.