Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cross-organization Terraform module file disclosure via provisioner daemon DownloadFile RPC

Moderate
jdomeracki-coder published GHSA-hrhj-hpwc-9hmc Aug 10, 2026

Package

Codestin Search App github.com/coder/coder/v2 (Go)

Affected versions

>= 2.30.0, < 2.34.8

Patched versions

2.34.8, 2.35.0, 2.36.0

Description

Summary

The DownloadFile gRPC handler in the provisioner daemon server allows an authenticated provisioner daemon to download cached Terraform module archive files belonging to any organization, bypassing multi-tenant isolation.

Vulnerability Details

When a provisioner daemon requests a file via the DownloadFile RPC, the handler retrieves the file from the database using system-level privileges (AsProvisionerd) and validates only that the file has CreatedBy set to the nil UUID and a MIME type of application/x-tar. This metadata check is intended to restrict downloads to cached Terraform module archives, but it applies uniformly to all such archives across all organizations. The handler does not verify that the requested file is associated with the provisioner's organization or with a job currently assigned to the provisioner.

All cached Terraform module archives are stored with identical metadata (CreatedBy = nil UUID, Mimetype = application/x-tar) regardless of organization, and the underlying files table has no organization scoping.

Impact

A provisioner daemon authenticated with an organization-scoped provisioner key could download cached Terraform module archives belonging to other organizations, provided it knows the file UUID. This could expose Terraform module source code, which may contain infrastructure topology details or embedded secrets.

Exploitation requires:

  1. A valid provisioner daemon authentication credential (e.g., an org-scoped provisioner key).
  2. Knowledge of a target file's UUID. File UUIDs are random (UUIDv4) and are not exposed through public API endpoints, making blind enumeration impractical.

Affected Component

coderd/provisionerdserver/provisionerdserver.go — the DownloadFile RPC handler on the ProvisionerDaemon gRPC service.

Remediation

Upgrade to a version of Coder that includes the fix for this issue. As a workaround, operators who do not use external provisioner daemons or multi-organization deployments are not affected.

Patched versions

This issue is fixed in the following releases:

Release line Patched version
2.36 (main) v2.36.0
2.35 v2.35.0
2.34 v2.34.8

Credits

We'd like to thank Anthropic's Security Team (ANT-2026-22440) for independently disclosing this issue!

Severity

Moderate

CVE ID

No known CVE

Weaknesses

Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. Learn more on MITRE.