Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,9 @@ exact pin would stop the suite sharing one `cts-common` with it.
with its own `Cargo.lock`.
- **The toolchain is pinned in the root `mise.toml`:** Rust 1.94.1 (the
`stack-encrypt` `tests/ui` trybuild snapshots record its diagnostics) and
Go 1.26. EQL's `mise.toml` overrides the Rust pin in its folder.
Go 1.26.10, the module's `go` minimum (#1300: the first 1.26 patch whose
`crypto/x509` blocks the compromised eMudhra intermediates). EQL's
`mise.toml` overrides the Rust pin in its folder.
protect-ffi's does not pin Rust, so the root pin applies there.
- **The cargo tools are pinned in `mise.test.toml`, not `mise.toml`:**
nextest, llvm-cov, crap, mutants, fuzz and udeps. EQL and protect-ffi
Expand Down
6 changes: 5 additions & 1 deletion languages/golang/cmd/stashgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ Your program calls those functions, and it never builds or names a plan.
## Use the SDK

1. Add the generator to your module.
This needs Go 1.26 or later.
This needs Go 1.26.10 or later (or 1.27.3 or later on 1.27):
those are the first releases whose `crypto/x509` blocks the compromised eMudhra intermediate CAs
([CVE-2026-111943](https://github.com/golang/go/issues/82345)).
The module's `go` line requires 1.26.10, so under the default `GOTOOLCHAIN=auto` an older local Go downloads and switches to 1.26.10.
A minimum cannot exclude 1.27.0 to 1.27.2, which are also vulnerable: do not build with those.
Comment on lines +11 to +15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice


```sh
go get -tool github.com/cipherstash/stack/languages/golang/cmd/stashgen
Expand Down
6 changes: 5 additions & 1 deletion languages/golang/encrypt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ The package reference is on [pkg.go.dev]; the generator's reference is

## Use the SDK

1. Add the generator to your module. This needs Go 1.26 or later.
1. Add the generator to your module. This needs Go 1.26.10 or later (or 1.27.3 or later on 1.27):
those are the first releases whose `crypto/x509` blocks the compromised eMudhra intermediate CAs
([CVE-2026-111943](https://github.com/golang/go/issues/82345)).
The module's `go` line requires 1.26.10, so under the default `GOTOOLCHAIN=auto` an older local Go downloads and switches to 1.26.10.
A minimum cannot exclude 1.27.0 to 1.27.2, which are also vulnerable: do not build with those.

```sh
go get -tool github.com/cipherstash/stack/languages/golang/cmd/stashgen
Expand Down
4 changes: 3 additions & 1 deletion languages/golang/encrypt/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
//
// # Use the SDK
//
// 1. Add the generator to your module (Go 1.26 or later):
// 1. Add the generator to your module (Go 1.26.10 or later, or 1.27.3 or later
// on 1.27: the first releases whose crypto/x509 blocks the compromised eMudhra
// intermediate CAs, CVE-2026-111943):
//
// go get -tool github.com/cipherstash/stack/languages/golang/cmd/stashgen
//
Expand Down
2 changes: 1 addition & 1 deletion languages/golang/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cipherstash/stack/languages/golang

go 1.26.0
go 1.26.10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in a follow-up: a binary built with Go 1.27.0, 1.27.1 or 1.27.2 still trusts the compromised eMudhra intermediates, and the SDK does not detect it.

Impact: The go 1.26.10 line forces a toolchain switch only when the local Go is older than 1.26.10. Go 1.27.0 to 1.27.2 are newer, so go get and go build keep them. A consumer on an unpatched Go 1.27 builds a vulnerable binary. That binary uses http.DefaultTransport by default (encrypt/client.go:75, auth/transport.go:81). A holder of the compromised keys can then impersonate ZeroKMS or the auth endpoint. Only the READMEs warn about this range.

Evidence: In go/version order, go1.27.0 is greater than go1.26.10, so a minimum in go.mod cannot exclude it. The PR description lists this gap as known.

Fix: Check runtime.Version() before the first request, for example in encrypt.NewClient and the auth store constructor. Use go/version: return an error when the version is at least go1.27 and below go1.27.3. Treat an invalid (devel) version as allowed.

Found by 1 model: claude


require (
github.com/cipherstash/vitaminc/bindings/go/vcffi v0.0.0-20260902024806-f2c7f7d17fbc
Expand Down
7 changes: 5 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ rust = { version = "1.94.1", components = "rustc,cargo,rustfmt,rust-std,clippy,r
# The cargo tools (nextest, llvm-cov, crap, mutants, fuzz, udeps) live in
# mise.test.toml, pinned, and load only with `--env test` / MISE_ENV=test.
# The Go module (languages/golang) — the wazero host of the WASI guests.
# CGO_ENABLED=0 throughout; see `go:test`.
go = "1.26"
# CGO_ENABLED=0 throughout; see `go:test`. Pinned to the patch, not the minor:
# 1.26.10 is the first 1.26 release whose crypto/x509 blocks the compromised
# eMudhra intermediates (CVE-2026-111943, #1300), and a floating "1.26" could
# resolve an older patch from a cache. Keep it at or above go.mod's `go` line.
go = "1.26.10"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in a follow-up: no test checks the Go 1.26.10 security floor in go.mod and mise.toml.

Impact: The fix for CVE-2026-111943 is two version strings. A later change can lower the go line in languages/golang/go.mod, or set this pin back to a floating "1.26". CI still passes in both cases. A Go SDK binary built after that change can accept certificate chains through the compromised eMudhra intermediates again.

Evidence: No file in scripts/__tests__/ reads the go line of go.mod or the go = "…" pin in mise.toml. go-module-path.test.mjs and go-release-version.test.mjs read only the module line. The comment above this line says "Keep it at or above go.mod's go line", but no test checks that rule.

Fix: Add scripts/__tests__/go-toolchain-floor.test.mjs. It must check three things: the go.mod go line is 1.26.10 or higher; the mise.toml pin is a full X.Y.Z version; the mise.toml pin is at or above the go.mod line.

Found by 1 model: claude

golangci-lint = "2.14.0"
# wasm-pack for the auth binding's `build:wasm`, which builds
# languages/typescript/packages/stack-auth-wasm into the auth package's wasm/.
Expand Down
Loading