Aug 22, 2026·6 min read·4 visits
Unsanitized workspace parameters in Atlantis enable directory traversal, allowing attackers to create or delete arbitrary folders on the host filesystem.
A critical path traversal vulnerability in Atlantis allows authenticated users or repository contributors to execute directory operations outside of the repository directory boundary via crafted workspace parameters in configuration files or API requests.
Atlantis is a self-hosted, open-source application designed to automate Terraform workflows using VCS pull requests. The application processes user-configured settings through repository-level configuration files named atlantis.yaml or through authenticated API endpoints. The primary attack surface resides in the workflow execution environment where workspace parameters are handled.\n\nA path traversal vulnerability exists in the handling of these workspace names. The system fails to validate user-provided directory strings before running local directory operations. This oversight enables attackers to manipulate paths and perform arbitrary filesystem directory creations and deletions on the host operating system.\n\nThe vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-73 (External Control of File Name or Path). Unauthenticated or low-privilege users can trigger this vulnerability remotely by modifying configuration files within a pull request or interacting with specific API endpoints. The scope of impact is limited to the host filesystem, affecting integrity and availability.
The root cause of this vulnerability lies in the way Atlantis processes user-supplied workspace names when establishing execution directories. When setting up a workspace for Terraform operations, Atlantis joins a base directory with the workspace name. In Go, the filepath.Join function cleans path separators but does not prevent directory traversal sequences from resolving outside of the target base folder.\n\nIn vulnerable configurations, Atlantis accepts arbitrary string inputs for the workspace parameter. This parameter is fetched from the repository's atlantis.yaml file or from the /api/plan endpoint. If an input string contains directory traversal elements such as ../, the resulting combined path resolves to a location outside the designated sandbox.\n\nOnce the target directory path is established, the application passes the unvalidated path to operations like os.MkdirAll for creation and os.RemoveAll for cleanup. Because these operations run with the privileges of the Atlantis process, they can modify or delete files anywhere the process has write access. This behavior bypasses the directory isolation model of the application.
An analysis of the vulnerable path shows that the application constructs directory locations without asserting boundaries. The following code demonstrates the vulnerable pattern where the workspace string is concatenated directly:\n\ngo\n// Vulnerable pattern of directory creation\nrepoPullDir := filepath.Join(w.DataDir, workingDirPrefix, r.FullName, strconv.Itoa(p.Num))\ncloneDir := filepath.Join(repoPullDir, workspace)\n\n// Creates directory outside intended boundaries if workspace contains \"../\"\nerr := os.MkdirAll(cloneDir, 0700)\n\n\nThe remediation patch introduces several key validation files. In server/utils/filepath.go, a containment check ensures that any resolved child path is physically located within the parent directory. This helper functions by verifying prefix matches:\n\ngo\npackage utils\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n)\n\nvar ErrPathEscapesBase = errors.New(\"path escapes base directory\")\n\nfunc EnsureSubPath(base, path string) error {\n\tcleanBase := filepath.Clean(base)\n\tcleanPath := filepath.Clean(path)\n\tif cleanPath != cleanBase && !strings.HasPrefix(cleanPath, cleanBase+string(os.PathSeparator)) {\n\t\treturn ErrPathEscapesBase\n\t}\n\treturn nil\n}\n\n\nAdditionally, the patch integrates input validation constraints in server/core/config/raw/project.go to reject dangerous characters in workspace names. The validator blocks any values containing .., /, or \\. The project command runner then evaluates the directory paths before executing commands.\n\nThe complete patch mitigates the flaw by combining input sanitization with runtime boundary validation. This multi-layered strategy blocks traversal payloads at the parser level and ensures that even if a payload bypasses initial checks, the command execution engine prevents out-of-bounds filesystem operations.
Exploitation requires the ability to supply a malicious atlantis.yaml configuration file to a target repository or to authenticate to the /api/plan API endpoint. The attacker does not need high-level system administrative privileges if repository write permissions allow them to open pull requests with modified configuration files.\n\nTo trigger the path traversal, the attacker specifies a workspace name with traversal sequences inside the atlantis.yaml file. For example, setting the workspace parameter to ../../../../tmp/target_dir directs the backend to target the host's /tmp/target_dir path instead of the repository workspace directory.\n\nyaml\n# Example malicious configuration snippet\nversion: 3\nprojects:\n - name: exploit-project\n dir: .\n workspace: \"../../../../tmp/target_dir\"\n\n\nWhen Atlantis processes the pull request, it parses the configuration and attempts to clean or initialize the directory. This action triggers the deletion of /tmp/target_dir via internal os.RemoveAll cleanup routines or creates nested structures in writable system paths. No functional code execution is achieved directly through the traversal itself, but the filesystem integrity is compromised.\n\nmermaid\ngraph LR\n A[\"User / Pull Request\"] -->|\"Injects workspace: '../../tmp/target'\"| B[\"atlantis.yaml Parser\"]\n B -->|\"Unsanitized Path Concatenation\"| C[\"filepath.Join(Base, Workspace)\"]\n C -->|\"Resolved Path: /tmp/target\"| D[\"os.RemoveAll() or os.MkdirAll()\"]\n D -->|\"Arbitrary Filesystem Write/Delete\"| E[\"Host File System\"]\n
The security impact of this vulnerability is assessed with a CVSS v3.1 score of 8.1, representing high severity. The CVSS vector is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H. The vulnerability allows an attacker to manipulate file directories outside of the intended repository-level isolation boundaries.\n\nBecause the workspace name is evaluated inside directory-removal functions during clean-up steps, an attacker can delete arbitrary folders on the host filesystem. This action can lead to denial of service if critical configuration or data directories are deleted. It also impacts system integrity by allowing unauthorized directory creation in system-writable paths like /tmp or /var.\n\nThe impact is limited to the system permissions under which the Atlantis service is executing. If Atlantis runs with elevated host permissions (such as root or administrator), the potential damage extends to system-critical paths. If it runs in a containerized environment, the impact is confined to the container space unless host directories are mounted.
The recommended remediation is to upgrade Atlantis to version 0.45.0 or later. This version incorporates the complete patch set containing the input validation layer and the path containment assertion utilities. Upgrading addresses the root issue across both configuration-based and API-based injection vectors.\n\nIf an immediate upgrade is not possible, administrators should implement temporary mitigation strategies. Access controls should be configured to prevent untrusted contributors from merging or triggering Atlantis runs on pull requests with modified atlantis.yaml files. Enabling the allowed_regexp_images or strict repository policies can also minimize exploitation opportunities.\n\nFurthermore, security teams can audit log files for indicators of abuse. Look for error messages or access logs containing path traversal sequences or configuration schemas referencing unexpected directory paths. Restricting the host process permissions to a non-root, isolated user account limits the damage an attacker can inflict via directory manipulation.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
atlantis runatlantis | >= 0.19.8, < 0.45.0 | 0.45.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| Attack Vector | Network (N) |
| CVSS Score | 8.1 (High) |
| Exploit Status | Proof-of-Concept / Patched |
| KEV Status | Not Listed |
| Affected Versions | >= 0.19.8, < 0.45.0 |
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly resolve or sanitize the input, allowing the path to resolve outside of the restricted directory.
A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.
CVE-2026-76905 is a high-severity Denial of Service (DoS) vulnerability in the getkin/kin-openapi library, specifically inside the openapi3filter sub-package. When processing multipart/form-data request validation errors, a missing nil-pointer guard causes a Go runtime panic during error formatting. This panic terminates the active server process if no recovery handler is present, resulting in a total denial of service. The vulnerability affects versions from v0.10.0 to v0.140.0, and is resolved in v0.141.0.
A critical server-side template injection (SSTI) vulnerability exists in the Volt template engine of the Phalcon PHP framework. In versions 5.15.0 and earlier, raw AST token values for filter arguments in the 'join' filter are directly spliced into the generated PHP template code. This allows an attacker who can influence Volt templates to execute arbitrary PHP code during template rendering.
CVE-2026-61539 is a critical remote code execution vulnerability in Xinference, an inference API framework for open-source LLMs. In version 2.5.0 and earlier, model-generated outputs representing Llama3 tool calls are passed directly to Python's built-in eval() function inside the parser components. By manipulating conversational input or injecting instructions, an attacker can influence the LLM to output a Python expression containing malicious system commands, resulting in unauthenticated remote code execution on the host. This vulnerability has been resolved in Xinference version 2.7.0.
An uncontrolled resource consumption vulnerability (CWE-400/CWE-789) exists within the kin-openapi Go library prior to version 0.142.0. The vulnerability occurs during the processing of highly sparse array indexes inside query parameters defined in deepObject style. An unauthenticated remote attacker can exploit this flaw to cause an immediate Out-of-Memory (OOM) crash of the target application.
A critical prototype pollution and sandbox escape vulnerability was discovered in the JSONata query and transformation library before versions 1.8.8 and 2.2.0. By providing a malicious JSONata expression that bypasses ownership checks on object properties, remote attackers can execute arbitrary code in the context of the host Node.js application.