Repository navigation
vendor: github.com/go-jose/go-jose/v4 v4.1.5 (security) - #14116
Conversation
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]>
There was a problem hiding this comment.
🟡 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/v4from v4.1.4 to v4.1.5 (plusgo.mod/go.sum/vendor/modules.txtupdates). - 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
left a comment
There was a problem hiding this comment.
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. |
|
Oh! There's one now; GHSA-6mp9-8xrw-74r4 |
Fixed security issues
Changed
full diff: go-jose/go-jose@v4.1.4...v4.1.5