Automation

OpenTofu 1.13.11 & 1.12.13: Bastion Host Key Breaking Fix, Mirror Bounds, and Parallel Init

OpenTofu v1.13.11 and v1.12.13 ship a security-driven breaking change to SSH provisioner connections: bastion_host_key is now enforced instead of falling back to host_key. Alongside Content-Length bounds for network mirror metadata, backend prompt interruption handling, and a provider configuration parallelization fix, these patch releases close subtle failure modes in automated IaC pipelines. Here is what changed and how to audit your HCL blocks before upgrading.

By 0xScorPionSon

8 min read

OpenTofu 1.13.11 & 1.12.13: Bastion Host Key Breaking Fix, Mirror Bounds, and Parallel Init

OpenTofu 1.13.11 security architecture showing bastion_host_key separation, bounded network mirror reads, and parallel provider initialization

Executive Summary

  • Breaking SSH Security Fix (#4885 / #4886): OpenTofu v1.13.11 and v1.12.13 (released November 30, 2026) fix a bug where SSH provisioner connections used host_key instead of bastion_host_key when verifying a bastion host. Pipelines that configure both host_key and bastion_host without an explicit bastion_host_key will fail verification until updated.
  • Network Mirror Read Bounds (#4881 / #4882): When fetching provider metadata from a network mirror, OpenTofu now bounds read bytes using the HTTP Content-Length header, preventing unbounded memory reads from misbehaving or untrusted mirrors.
  • Provider Parallelization and Backend Interrupts (#4877, #4755): Both v1.13.11 and v1.12.13 fix a regression in provider configuration parallelization (#4877), while v1.13.11 also ensures clean handling when users or CI jobs interrupt the interactive backend configuration prompt (#4755).
  • Cumulative Security Baseline (GO-2026-6859): Together with v1.13.10 (Go 1.27.4) and v1.12.13 (Go 1.26.11), the late-November/early-December 2026 patch series mitigates an HTTP/1 server crash caused by a MaxBytesReader header race (#4831). Note: this article covers the latest official patch releases (v1.13.11 and v1.12.13, November 30, 2026, packaged in downstream ports through December 3, 2026).

What Changed in OpenTofu 1.13.11 and 1.12.13

In late November 2026, the OpenTofu project issued coordinated patch releases across both active release lines: v1.13.11 (6658f54) and v1.12.13 (8478087), building directly on the earlier v1.13.10 security and tofu test patch (4dcfb2e) documented in the OpenTofu GitHub Releases and Releasebot OpenTofu changelog. Downstream packaging—such as the FreeBSD sysutils/opentofu port—picked up 1.13.11 on December 3, 2026.

Unlike routine patch bumps that only swap transitive dependencies, v1.13.11 and v1.12.13 explicitly flag a breaking security correction in remote SSH provisioner connections, tighten HTTP client bounds for private provider network mirrors, and resolve a concurrency regression in provider configuration evaluation.

1. Proper bastion_host_key Enforcement (#4885 in v1.13.11, #4886 in v1.12.13)

In OpenTofu's Provisioner Connection Settings, teams deploying into private subnets often route remote-exec or file provisioners through an SSH jump host using bastion_host and bastion_host_key, while verifying the final target VM with host_key. Prior to v1.13.11 and v1.12.13, a bug caused the SSH client to pass host_key instead of bastion_host_key when verifying the bastion connection.

That mismatch created two problems:

  • Silent Misvalidation: If a bastion and target host did not share the same host key or CA certificate, or if an operator relied on bastion_host_key to pin a dedicated bastion key, the wrong key was checked.
  • Accidental Reliance on host_key: Environments where host_key happened to satisfy the bastion check (for example, a shared SSH CA public key across both bastion and target) worked without ever setting bastion_host_key.

With #4885 and #4886, OpenTofu now strictly uses bastion_host_key for the bastion hop and host_key for the target host. As the release notes warn, this is a breaking change for any configuration that sets host_key alongside bastion_host without setting bastion_host_key.

2. Bounded Provider Network Mirror Metadata Reads (#4881 / #4882)

Air-gapped and enterprise CI runners commonly configure network_mirror in .tofurc or tofu.rc using the Provider Network Mirror Protocol to serve index.json and version package metadata over HTTPS. In v1.13.11 (#4881) and v1.12.13 (#4882), downloading provider metadata from a network mirror now bounds the read bytes based on the received Content-Length header. This hardens tofu init against malformed or oversized responses from compromised or misconfigured mirror servers.

3. Provider Parallelization, Prompt Interrupts, and Go Toolchain Fixes

  • Provider Configuration Parallelization (#4877): Both v1.13.11 and v1.12.13 fix a regression affecting how provider configurations are evaluated in parallel, restoring expected concurrency in multi-provider or aliased configurations.
  • Backend Configuration Prompt Interruption (#4755): In v1.13.11, sending an interrupt signal (SIGINT) during an interactive backend configuration prompt is now handled cleanly rather than leaving the CLI in an inconsistent state.
  • Go Toolchain GO-2026-6859 (#4831): v1.12.13 upgrades to Go 1.26.11 (matching v1.13.10's upgrade to Go 1.27.4) to remediate GO-2026-6859, an HTTP/1 server crash triggered by a MaxBytesReader header race.
flowchart LR
    A[tofu apply / provisioner] --> B{bastion_host set?}
    B -->|No| C[Verify Target SSH with host_key]
    B -->|Yes| D[Verify Bastion SSH with bastion_host_key #4885]
    D -->|Verified| E[Connect to Target & Verify host_key]
    D -->|Missing / Mismatch| F[Fail Provisioner Connection]
    G[tofu init] --> H[Network Mirror HTTPS Request]
    H --> I[Bound Read Bytes by Content-Length #4881]
    I --> J[Parallel Provider Config Evaluation #4877]

Reliability, Cost, and Performance Analysis

For platform engineering teams running OpenTofu inside automated CI/CD pipelines (GitHub Actions, GitLab CI, Spacelift, or Atlantis), the v1.13.11 and v1.12.13 patches primarily impact pipeline determinism, memory safety during tofu init, and multi-provider apply throughput.

Why bastion_host_key Breaks Existing Pipelines—and Why It Matters

In automated infrastructure pipelines, remote-exec and file provisioners are typically treated as last-resort bootstrap steps (for example, waiting for cloud-init or seeding an initial agent when user-data is insufficient). Because SSH host key verification is disabled by default unless host_key or bastion_host_key is specified, organizations that enforce strict host key pinning do so specifically to prevent man-in-the-middle interception inside VPCs or across jump hosts.

When #4885 / #4886 landed, any module using a shared CA key in host_key without duplicating it into bastion_host_key began failing immediately on tofu apply after the binary upgrade. While inconvenient in the short term, failing closed on an unpinned bastion hop is the correct security posture: it guarantees that bastion identity verification cannot silently inherit a target host key.

Network Mirror Bounds and tofu init Stability

In large monorepos with dozens of providers, tofu init executes repeatedly across ephemeral CI containers. Bounding provider metadata reads by Content-Length (#4881 / #4882) eliminates a memory-exhaustion vector if an internal static mirror or reverse proxy streams unexpected payload sizes. Note that OpenTofu's CLI Configuration File documentation also emphasizes keeping trust_all_hashes = false (the default) unless you fully control the mirror, because trust_all_hashes = true lets a mirror populate lockfile hashes for all platforms.

Provider Parallelization and 1.13 Lifecycle Context

Restoring provider configuration parallelization (#4877) removes an unintended serialization bottleneck in stacks with multiple regional or account-scoped provider blocks. Upstream release notes do not publish exact wall-clock benchmark deltas for #4877 (confidence: high on the regression fix from official release notes; exact speedup depends on provider count and network latency).

More broadly, teams still on 1.12.x should note that OpenTofu 1.13—which receives security support until August 2027 according to Hidde de Smet's November 2026 OpenTofu analysis—already removed WinRM provisioner support (type = "winrm" errors in 1.13+) and changed base64gzip output bytes. Meanwhile, 1.13.10 fixed tofu test resource overrides for indexed modules (#4859) and symbol library planning/crash bugs (#4816, #4861), making v1.13.11 the cleanest target for teams ready to leave 1.12.x.

Practical Implementation and Upgrade Trade-Offs

Before bumping your CI runner images or .opentofu-version pins to v1.13.11 (or v1.12.13), run through four concrete verification steps.

1. Grep All Modules for bastion_host + host_key

Search your Terraform/OpenTofu repositories for any connection block that specifies bastion_host alongside host_key. If bastion_host_key is absent, add it explicitly. Below is a safe, compliant connection block pattern for OpenTofu v1.13.11:

resource "terraform_data" "bootstrap" {
  connection {
    type             = "ssh"
    user             = "ops"
    host             = var.target_private_ip
    host_key         = var.target_ssh_host_key
    private_key      = var.ssh_private_key
    bastion_host     = var.bastion_public_ip
    bastion_host_key = var.bastion_ssh_host_key
    bastion_user     = "jump"
  }

  provisioner "remote-exec" {
    inline = ["echo verified-bastion-and-target"]
  }
}

If your organization signs both bastion and target host certificates with the same SSH Certificate Authority (@cert-authority), set bastion_host_key = var.ssh_ca_public_key alongside host_key = var.ssh_ca_public_key.

2. Verify Network Mirror Content-Length Headers

If you host an internal provider mirror behind NGINX, Envoy, or an S3-backed CDN, verify that GET /:hostname/:namespace/:type/index.json and version metadata endpoints return accurate Content-Length headers (or standard chunked/length behavior compatible with Go's HTTP client) so #4881 / #4882 does not truncate valid metadata responses. According to the CLI Configuration File reference, each network_mirror block requires an https:// URL ending with a trailing slash and optionally supports download_retry_count for transient 500 or connection-reset errors. Teams populating air-gapped mirrors via tofu providers mirror can also verify packed or unpacked filesystem layouts before switching CI runners to v1.13.11.

3. Choose Between v1.12.13 and v1.13.11

Upgrade Dimension OpenTofu v1.12.13 OpenTofu v1.13.11
Go Toolchain / GO-2026-6859 Go 1.26.11 (#4831) Inherited from v1.13.10 (Go 1.27.4)
SSH bastion_host_key Fix Yes (#4886, breaking if unset) Yes (#4885, breaking if unset)
Network Mirror Content-Length Bound Yes (#4882) Yes (#4881)
Provider Parallelization Fix Yes (#4877) Yes (#4877)
WinRM Provisioners & 1.13 Features WinRM deprecated (still runs) WinRM removed; includes convert/assume*

4. Re-Evaluate Provisioner Usage Altogether

While v1.13.11 hardens SSH bastion verification, OpenTofu's own documentation notes that provisioners are a last resort because they execute outside the declarative state graph. Whenever possible, replace remote-exec blocks with immutable Packer/AMI builds, cloud-init user-data, or Ansible pull/SSM automation so host_key management is handled by your OS image pipeline rather than IaC apply runners.

Frequently Asked Questions

1. Why did my OpenTofu SSH provisioner fail after upgrading to v1.13.11 or v1.12.13?

OpenTofu v1.13.11 (#4885) and v1.12.13 (#4886) fixed a bug where host_key was mistakenly used to verify the bastion_host instead of bastion_host_key. If your connection block sets host_key and bastion_host without bastion_host_key, you must add bastion_host_key pointing to the bastion's public key (or the same CA key if shared).

2. Is the bastion_host_key fix in both v1.13.x and v1.12.x?

Yes. It shipped simultaneously in v1.13.11 (#4885) and v1.12.13 (#4886) on November 30, 2026.

3. What does the network mirror Content-Length change in #4881 do?

When tofu init downloads provider metadata from an HTTPS network_mirror, OpenTofu now bounds the number of bytes read based on the server's Content-Length response header, mitigating unbounded read/memory risks from malformed mirror responses.

4. Does v1.13.11 include the GO-2026-6859 Go toolchain security fix?

Yes. v1.13.10 upgraded OpenTofu 1.13.x to Go 1.27.4 for GO-2026-6859 (#4831), and v1.13.11 builds on v1.13.10. For 1.12.x users, v1.12.13 backports the fix using Go 1.26.11.

5. Should teams upgrade straight to v1.13.11 or stay on v1.12.13?

If your modules no longer use type = "winrm" provisioners and you have tested base64gzip diffs, v1.13.11 is the recommended target because the 1.13 series carries security support until August 2027 and includes tofu test indexed module fixes (#4859) and assume* planning functions. Stay on v1.12.13 temporarily only if you still depend on deprecated WinRM provisioners.

Sources

  1. OpenTofu GitHub Releases (v1.13.11, v1.12.13, v1.13.10) — November 30, 2026: https://github.com/opentofu/opentofu/releases
  2. OpenTofu Provisioner Connection Settings Documentation — OpenTofu v1.13.x Docs (2026): https://opentofu.org/docs/language/resources/provisioners/connection/
  3. OpenTofu Provider Network Mirror Protocol & CLI Config Docs — OpenTofu v1.13.x Docs (2026): https://opentofu.org/docs/internals/provider-network-mirror-protocol/
  4. Releasebot — OpenTofu Release Notes (v1.13.11 & v1.12.13) — November 30, 2026: https://releasebot.io/updates/opentofu
  5. FreshPorts — sysutils/opentofu 1.13.11 Packaging Commit — December 3, 2026: https://www.freshports.org/sysutils/opentofu
  6. Hidde de Smet — OpenTofu in 2026: Beyond the Terraform Fork — November 23, 2026: https://hiddedesmet.com/opentofu-beyond-the-terraform-fork

More on Automation

Automation

Red Hat Ansible Automation Platform 2.7: Portal 2.3.2 Security Fixes, Mandatory Gateway Auth, and MCP Server

Red Hat Ansible Automation Platform 2.7 (with patch 2.7-12.5 on December 3, 2026 and portal 2.3.2 on November 30, 2026) reshapes enterprise automation security and AI integration. Portal 2.3.2 patches command-injection and HTTP Range DoS CVEs, while 2.7 enforces mandatory platform gateway authentication, removes Personal Access Tokens and Basic auth, and introduces an MCP server for governed AI execution. Here is the technical breakdown.

8 min read

Automation

Mend Renovate 45.15: Bun Catalogs, Cache Lock Resilience, and Containerbase SQLite

Mend Renovate 45.15.3 (December 4, 2026) caps a rapid series of updates following the Renovate 45 major release. Across 45.0 through 45.15.3, the project introduced Bun catalog extraction and update support, a non-blocking package cache lock timeout fallback, preserved PR control blocks under body truncation, and a Containerbase overhaul that replaces NeDB with SQLite and drops Ubuntu 22.04. Here is what changed, why it matters for CI reliability, and how to migrate self-hosted runners safely.

10 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla