CVE-2026-116676 — Vulnerability in runatlantis/atlantis — CVE Details
Atlantis: OS command injection through PR-controlled Terraform workspace enables RCE during plan
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.65%). Schedule for your next planned update.
Does your project use an affected github.com/runatlantis/atlantis version?
Paste your go.sum to check it for CVE-2026-116676 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Atlantis passes the Terraform workspace value from a pull request's atlantis.yaml into a shell command without quoting or escaping it.
A contributor whose pull request is eligible for an Atlantis plan can include shell metacharacters in the workspace name and execute arbitrary commands as the Atlantis service account. This does not require custom workflows, allow_custom_workflows, or permission to run terraform apply.
The executed command inherits the Atlantis process environment, which commonly contains cloud-provider, Terraform, and VCS credentials.
Details
Verified against current upstream/main commit 92ce5c51d1a050357e44df3535483425e59fa984 on August 13, 2026.
The vulnerable data flow is:
-
The PR-controlled project workspace is validated in
server/core/config/raw/project.go.Validation rejects only
..,/, and\. Shell metacharacters such as;,#,$, redirections, and whitespace remain permitted. -
The workspace is passed directly as a Terraform command argument in
server/core/runtime/workspace_step_runner_delegate.go:[]string{workspaceCmd, "select", ctx.Workspace} -
Terraform arguments are concatenated into a single string using
strings.Join(args, " ")inserver/core/terraform/tfclient/terraform_client.go:tfCmd := fmt.Sprintf("%s %s", binPath, strings.Join(args, " ")) -
The resulting string is executed through
sh -cinserver/core/terraform/tfclient/terraform_client.go:cmd := exec.Command("sh", "-c", tfCmd)
Consequently, a workspace such as:
poc;id;false;#
produces commands equivalent to:
terraform workspace select poc;id;false;#
terraform workspace new poc;id;false;#
raw.Project.Validate() was confirmed to return no error for this workspace value.
Atlantis documents that planning untrusted Terraform can already be dangerous because providers and external data sources execute code. The distinct issue here is that an ordinary project configuration field becomes shell source, bypassing the explicit allow_custom_workflows control and requiring no malicious provider, external data source, custom workflow, or apply operation.
The primary remediation should be to execute Terraform using an argument vector rather than constructing shell source—for example, exec.Command(binaryPath, args...). Any required environment-variable expansion should be performed without invoking a shell. Strict workspace-name validation would also provide defense in depth.
PoC
Only reproduce this against a disposable Atlantis instance and test repository.
Preconditions
- Atlantis processes
atlantis.yamlfrom the pull request branch. - The pull request is eligible to run
atlantis plan. - For a fork pull request, the server must have
--allow-fork-prsenabled. A same-repository branch does not require this flag. - No custom workflows or apply permissions are required.
Repository contents
Create main.tf:
terraform {
required_version = ">= 1.0"
}
Create atlantis.yaml:
version: 3
projects:
- name: workspace-rce-poc
dir: .
workspace: "poc;id;false;#"
autoplan:
enabled: false
Open a pull request containing these files and comment:
atlantis plan -p workspace-rce-poc
Expected result
Atlantis first runs terraform workspace select. The injected false causes that command invocation to return an error, so Atlantis retries using terraform workspace new.
On both attempts, the shell executes id as a separate command. The second failure includes the combined command output in the Atlantis error response, exposing output similar to:
uid=1000(atlantis) gid=1000(atlantis) groups=1000(atlantis)
This demonstrates arbitrary shell-command execution without creating a custom workflow or reaching the apply phase.
The payload uses only id and false and does not access credentials, make network requests, or modify the host beyond Terraform potentially creating the disposable poc workspace.
Impact
This is an OS command injection vulnerability resulting in remote code execution as the Atlantis service account.
Affected deployments are those that:
- Process pull-request-controlled
atlantis.yamlproject configuration; and - Permit the attacker-controlled pull request to trigger an Atlantis plan.
Potential consequences include:
- Reading and exfiltrating cloud-provider, Terraform, and VCS credentials inherited from the Atlantis process.
- Accessing Terraform state, plan files, repository checkouts, caches, and other data available to the Atlantis user.
- Modifying files or binaries accessible to the service account.
- Making network requests using the Atlantis server's network identity.
- Pivoting into infrastructure accessible through the server's credentials or network placement.
For public repositories, arbitrary external contributors are directly exposed when --allow-fork-prs is enabled. Without fork PR support, the vulnerable population includes users able to create eligible same-repository pull requests and attackers controlling such accounts.
Advisory Timeline
- First published October 27, 2026 (30 days ago).
- Last revised November 5, 2026 — 9 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/runatlantis/atlantis@v0.47.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/runatlantis/atlantis Go · Affected: All versions | 0.47.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/runatlantis/atlantis/security/advisories/GHSA-rjh2-4xgw-p2hjWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-116676ADVISORY
- https://github.com/runatlantis/atlantis/pull/6792WEB
- https://github.com/runatlantis/atlantis/commit/8dd22b4d0a9d7c129fdbf6a3398dd1c4cf8c3a59WEB
- https://github.com/runatlantis/atlantis/commit/f04df0d53f0544d9eb6f5026dd8b74fbefd82ac8WEB
- https://github.com/runatlantis/atlantisPACKAGE
- https://github.com/runatlantis/atlantis/releases/tag/v0.47.1WEB
Frequently Asked Questions
- What is CVE-2026-116676?
- Atlantis: OS command injection through PR-controlled Terraform workspace enables RCE during plan. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-116676?
- CVE-2026-116676 affects github.com/runatlantis/atlantis. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-116676 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 45.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-64679HIGH
Atlantis Workspace Handling has Path Traversal that Allows Out-of-Bounds Directory Deletion/Creation
- CVE-2026-108262HIGH
DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885
- CVE-2024-52009HIGH
Git credentials are exposed in Atlantis logs
- CVE-2026-130007HIGH
k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution