Skip to content

vendor: github.com/go-jose/go-jose/v4 v4.1.5 (security) - #14116

Merged
fuweid merged 1 commit into
containerd:mainfrom
thaJeztah:bump_jose
Sep 7, 2026
Merged

fuweid merged 1 commit into
containerd:mainfrom
thaJeztah:bump_jose

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Fixed security issues

  • cipher/cbc_hmac: don't panic on empty ciphertext
  • cipher/cbc_hmac: don't panic on invalid key
  • json: limit stack depth
  • jwt: reject out-of-range NumericDate values
  • Check alg against pubkey curve during verify.
  • Reject malformed Ed25519 JWKs
  • jws: choose verification key per-signature

Changed

  • Verify OpaqueSigner's Public() return is public
  • jws: skip signature on ErrJWKSKidNotFound
  • Handle JWE JSON without protected header
  • jws: don't strip internal whitespace before parsing JSON
  • jws: fewer calls to OpaqueSigner.Public()
  • Return a specific error when parsing empty string
  • Reject typed nil at Verify time

full diff: go-jose/go-jose@v4.1.4...v4.1.5

Fixed security issues

- cipher/cbc_hmac: don't panic on empty ciphertext
- cipher/cbc_hmac: don't panic on invalid key
- json: limit stack depth
- jwt: reject out-of-range NumericDate values
- Check alg against pubkey curve during verify.
- Reject malformed Ed25519 JWKs
- jws: choose verification key per-signature

Changed

- Verify OpaqueSigner's Public() return is public
- jws: skip signature on ErrJWKSKidNotFound
- Handle JWE JSON without protected header
- jws: don't strip internal whitespace before parsing JSON
- jws: fewer calls to OpaqueSigner.Public()
- Return a specific error when parsing empty string
- Reject typed nil at Verify time

full diff: go-jose/go-jose@v4.1.4...v4.1.5

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 2.4 milestone Sep 5, 2026
Copilot AI lite review requested due to automatic review settings September 5, 2026 00:54
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Sep 5, 2026

Copilot AI left a comment

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.

🟡 Changes recommended

Two updated methods can still panic on zero-value/empty-signature or empty-recipient inputs and should return errors instead of indexing empty slices.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This pull request bumps the vendored github.com/go-jose/go-jose/v4 dependency to v4.1.5 to incorporate upstream security fixes and behavior hardening in JOSE/JWT/JWK/JWS/JWE parsing, validation, and verification.

Changes:

  • Vendor update of github.com/go-jose/go-jose/v4 from v4.1.4 to v4.1.5 (plus go.mod/go.sum/vendor/modules.txt updates).
  • Adds/adjusts defensive validation (e.g., empty input handling, Ed25519 JWK validation, JSON nesting depth limit, key/alg mismatch checks).
  • Refines JWS/JWE verification/decryption behavior (per-signature JWKS key selection, error handling, and header handling).
File summaries
File Description
vendor/modules.txt Updates vendored module version entry for go-jose v4.1.5.
go.mod Bumps indirect requirement for github.com/go-jose/go-jose/v4 to v4.1.5.
go.sum Updates checksum entries for go-jose v4.1.5.
vendor/github.com/go-jose/go-jose/v4/symmetric.go Renames RNG hook to randReader and updates callers.
vendor/github.com/go-jose/go-jose/v4/signing.go Tightens verifier key validation and adjusts multi-signature verification behavior.
vendor/github.com/go-jose/go-jose/v4/shared.go Adds new internal/public error values used by updated parsing/validation logic.
vendor/github.com/go-jose/go-jose/v4/opaque.go Validates opaque signer public key is actually public.
vendor/github.com/go-jose/go-jose/v4/jws.go Adjusts whitespace handling and adds explicit empty-input parsing errors.
vendor/github.com/go-jose/go-jose/v4/jwk.go Hardens JWK marshal/unmarshal and Ed25519 key validation; refactors JWKS key selection helper.
vendor/github.com/go-jose/go-jose/v4/jwe.go Adds explicit empty-input parsing errors for JWE parsing entrypoints.
vendor/github.com/go-jose/go-jose/v4/json/scanner.go Adds a maximum nesting depth check to prevent stack overflow.
vendor/github.com/go-jose/go-jose/v4/crypter.go Refactors recipient handling and decompression flow in JWE decryption paths.
vendor/github.com/go-jose/go-jose/v4/cipher/cbc_hmac.go Adds key-size validation and prevents padding logic panics on empty ciphertext.
vendor/github.com/go-jose/go-jose/v4/asymmetric.go Uses shared RNG hook and validates ECDSA alg against public key curve during verify.
Review details
  • Files reviewed: 1/14 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mxpv mxpv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder why dependabot did not bump this one.

@thaJeztah

Copy link
Copy Markdown
Member Author

I wonder why dependabot did not bump this one.

Probably a combination of a) cooldown period, b) its an indirect dependency, and c) I noticed they don't always publish advisories; their changelog mentions "security" but there's no CVE or GHSA that's public.

@thaJeztah

Copy link
Copy Markdown
Member Author

Oh! There's one now; GHSA-6mp9-8xrw-74r4

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Sep 7, 2026
@fuweid
fuweid added this pull request to the merge queue Sep 7, 2026
Merged via the queue into containerd:main with commit e5e0757 Sep 7, 2026
55 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 7, 2026
@thaJeztah
thaJeztah deleted the bump_jose branch September 7, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants