Fix CVE-2026-45363: upgrade jwt gem to 3.2.0#1693
Merged
zanejohnson-azure merged 1 commit intoMay 19, 2026
Merged
Conversation
Bumps ruby-jwt from 2.7.1 to 3.2.0 to address CVE-2026-45363 (HIGH): empty-key HMAC bypass. Compatibility verified: - Only usage in repo is source/plugins/ruby/KubernetesApiClient.rb, which calls JWT.decode(token, nil, false) (unverified decode) and rescues JWT::DecodeError. Both the JWT.decode signature and the JWT::DecodeError class are unchanged in jwt 3.x. - Token is already .strip'd before decode, satisfying the stricter RFC 4648 base64 requirement introduced in jwt 3.0. - No HMAC/RSA/ECDSA signing, JWT::EncodedToken, or claim-verification APIs are used, so none of the other jwt 3.0 breaking changes apply. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
suyadav1
approved these changes
May 19, 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.
Summary
Bumps the
jwtgem from 2.7.1 to 3.2.0 to fix CVE-2026-45363 (HIGH) - Empty-key HMAC bypass.Why a major version bump is safe for ama-logs
jwtis a third-party gem (not a default gem shipped with Ruby), and ama-logs uses an extremely small slice of its API. The only consumer issource/plugins/ruby/KubernetesApiClient.rb:This is used purely to read the
expclaim out of the in-pod service account token to know when to refresh it. No signing, no signature verification, no JWKs, noJWT::EncodedToken, no claim-verification helpers.jwt 3.x breaking changes vs. this usage
Checked against the v3.0 upgrade guide:
JWT::EncodedToken#payloadraises before verificationJWT.decode(token, key, verify)API.stripthe token before decodingJWT::JWA::SigningAlgorithmpayload["exp"]directlykfor HMAC JWKsJWT.decode(jwt, key=nil, verify=true, options={}, &keyfinder)has an identical signature in v3.2.0/lib/jwt.rb, and whenverify=falsethe internalDecode#decode_segmentsreturns[unverified_payload, header]- exactly as in 2.7.1.JWT::DecodeErroris also unchanged.Files changed
kubernetes/linux/setup.sh-gem_install_with_retry jwt -v "3.2.0"kubernetes/windows/Dockerfile-gem install jwt -v 3.2.0Testing
CI build + trivy scan on the resulting image confirms the CVE is gone. Functional path (token refresh in
KubernetesApiClient.getTokenStr) exercises only the unchanged surface of the gem.References
Validation: backdoor deployment on AKS test cluster
Deployed prod baseline (
ciprod:3.3.0) and the test image with this change (cidev:3.3.0-26-gf10e2b232-20260519175254, jwt 3.2.0) tozane-ama-logs-helm-test3and compared a 5-minute steady-state window (deploy+5 to deploy+10) for both.Pods (test): 2 DS + 1 RS, all
Running3/3 (DS) / 2/2 (RS), 0 restarts.LAW data volume per minute
stale-pod-cleanupcontainer)stale-pod-cleanuppod)stale-pod-cleanupcounters)auoms-containerstopped in cluster between windows; log-gen exact match)jwt-specific signal
KubeMonAgentEventsin test window: 0 events, 0 jwt/token errors. Token-refresh path (KubernetesApiClient.getTokenStr->JWT.decode(token, nil, false)) runs continuously and produced noJWT::DecodeErrorwarnings.Resource consumption (peak per minute, 5-min window)
Memory variance (~5-25 MB on DS, RS lower) is within normal per-node workload variance. CPU is equal or lower in test. No regression.
Verdict: PASS - no data-ingestion regression, no jwt errors, no resource regression.