CVE-2026-89036 in Appwrite
Summary
by MITRE • 09/17/2026
Appwrite before 2.0.0 contains an argument injection vulnerability that allows authenticated users with functions.write or sites.write permissions to execute arbitrary commands by injecting TAB characters into the providerRootDirectory parameter used to construct GNU tar commands. The application uses escapeshellcmd instead of escapeshellarg and fails to quote the parameter, allowing TAB characters to survive sanitization and be interpreted as argument separators, enabling injection of arbitrary GNU tar arguments such as --checkpoint-action=exec to achieve remote code execution as the builds worker process user.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 09/17/2026
The vulnerability identified in Appwrite versions prior to 2.0.0 represents a critical server-side command injection flaw rooted in improper input sanitization and argument handling within the application's build system components. This security defect specifically affects authenticated users who possess either functions.write or sites.write permissions, granting them sufficient privileges to trigger the vulnerable code paths during deployment operations. The core technical issue lies in how the application constructs GNU tar commands for processing project archives. Instead of utilizing robust input validation and secure argument passing mechanisms, the software relies on escapeshellcmd to sanitize user-supplied inputs before embedding them into shell command strings. This approach is fundamentally flawed because escapeshellcmd only escapes characters that have special meaning to a shell, such as semicolons or backticks, but it does not properly handle whitespace-based delimiters like TAB characters when the resulting string is executed in contexts where argument separation relies on spaces and tabs rather than explicit quoting.
The operational mechanism of this exploit involves injecting TAB characters into the providerRootDirectory parameter, which dictates the source directory for archive operations. Because escapeshellcmd fails to escape or neutralize these TABs, they persist through the sanitization process and are interpreted by the underlying shell as argument separators during command execution. This allows an attacker to effectively break out of the intended tar arguments and append arbitrary GNU tar options directly into the command line. By leveraging specific GNU tar features such as --checkpoint-action=exec, which is designed for progress reporting but can be abused to execute external programs, the injected payload achieves remote code execution under the context of the builds worker process user. This escalation path transforms a seemingly benign file operation into a full system compromise, granting attackers control over the application's runtime environment and potentially leading to data exfiltration or lateral movement within the infrastructure.
From a classification perspective, this vulnerability aligns with CWE-78 Improper Neutralization of Special Elements used in an OS Command commonly known as OS Command Injection. The failure to properly quote arguments corresponds closely to CWE-88 Argument Injection, where untrusted input is incorporated into command-line arguments without adequate validation or escaping that preserves the integrity of argument boundaries. In terms of adversary behavior mapping under MITRE ATT&CK, this technique falls under T1059 Command and Scripting Interpreter, specifically leveraging OS-native utilities for execution. The exploitation requires authentication, placing it within the Initial Access or Persistence tactics depending on whether the executed commands establish a foothold or maintain access to the compromised system.
Mitigation strategies must prioritize immediate patching of Appwrite to version 2.0.0 or later where this logic has been corrected. For environments unable to upgrade immediately, defensive measures should include restricting network access to the build worker processes and implementing strict firewall rules that limit outbound connections from these containers. Additionally, applying principle of least privilege principles ensures that even if exploitation occurs, the impact is contained by limiting the permissions associated with functions.write and sites.write roles. Long-term remediation involves refactoring command construction logic to use language-native array-based argument passing mechanisms rather than string concatenation or shell execution, thereby eliminating the possibility of argument injection entirely regardless of input content.