Repository navigation
fix(security): migrate go-jose to v4.1.6 (CVE-2026-116587) - #390
Merged
pysarenko-bohdan merged 1 commit intoNov 24, 2026
Merged
Conversation
… CFS-23520) go-jose v3 has no fixed release for GHSA-mgcc-cww5-fp2q (unbounded RSA JWK validation -> CPU DoS via a jwk header in any parsed JWS/JWE), so: - github.com/go-jose/go-jose/v3 v3.0.5 -> github.com/go-jose/go-jose/v4 v4.1.6 - github.com/coreos/go-oidc/v3 v3.9.0 -> v3.10.0 (first release on go-jose v4) - server/auth/sso: v4's jwt.ParseEncrypted refuses asymmetric key algorithms, so Authorize parses the token via the JWE API with an explicit RSA-OAEP-256/A256GCM allowlist. The token format is unchanged, so existing SSO sessions and mixed-version rolling upgrades keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vadim-kharin-codefresh
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CFS-23509 (codefresh/workflow-controller), CFS-23520 (codefresh/argocli)
Motivation
CVE-2026-116587 / GHSA-mgcc-cww5-fp2q (High): go-jose does not bound the RSA JWK size before
rsa.PrivateKey.Validate(). Ajwkheader embedded in any parsed JWS/JWE causes CPU exhaustion (DoS) before any signature or decryption check. In argo-server SSO mode this path is reachable without authentication:Authorizeparses the client'sAuthorizationheader.go-jose/v4: fixed in v4.1.6.go-jose/v3: no fixed release exists (v3.0.5 is the latest and is affected), so the only fix is moving off v3.Modifications
github.com/go-jose/go-jose/v3 v3.0.5→github.com/go-jose/go-jose/v4 v4.1.6. The indirect v4.1.4 is also bumped.github.com/coreos/go-oidc/v3 v3.9.0→v3.10.0. This is the first release on go-jose v4; its diff is only that migration, and the ID-token signing-algorithm policy is unchanged.server/auth/sso/sso.go: go-jose v4'sjwt.ParseEncryptedrefuses all asymmetric key algorithms.Authorizenow usesjose.ParseEncryptedCompactwith an explicitRSA-OAEP-256/A256GCMallowlist, thenDecryptand unmarshals the claims with go-jose's json package. This is whatjwt.Claims()does internally.CompactSerialize()→Serialize()(renamed in v4).v3→v4), mostly tests.Verification
go build ./...,go vet, gofmt,go mod verify,golangci-lint run ./server/auth/...(0 issues).go test ./server/... ./workflow/creator/... ./workflow/util/...: 23 packages ok.go version -mon theargo,workflow-controllerandargoexecbinaries: onlygo-jose/v4 v4.1.6andgo-oidc/v3 v3.10.0, no go-jose v3.AuthorizeRSA-OAEP/A128GCMalgorithms and garbage input are all rejected🤖 Generated with Claude Code