Fix critical DPoP nonce bypass and security issues#8
Open
Cache8063 wants to merge 2 commits intostreamplace:mainfrom
Open
Fix critical DPoP nonce bypass and security issues#8Cache8063 wants to merge 2 commits intostreamplace:mainfrom
Cache8063 wants to merge 2 commits intostreamplace:mainfrom
Conversation
- Fix DPoP nonce bypass in DPoPNonceMiddleware: validate the client's nonce from the DPoP JWT claims instead of reading back our own response header (which always passed validation) - Add error checks after GetOauthClient() in Return() and getOAuthSession() — errors were silently overwritten by the next variable assignment - Remove access token from error log in Return() to prevent credential leakage in log output - Remove debug fmt.Println in HandleOAuthToken and fmt.Printf in Status() that leaked session data to stdout Ref: streamplace#7 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- mattn/go-sqlite3 v1.14.22 → v1.14.34 (CVE-2025-6965: CRITICAL SQLite memory corruption, CVE-2025-29087: concat_ws overflow) - golang.org/x/crypto v0.39.0 → v0.49.0 (CVE-2025-58181: SSH GSSAPI DoS) - golang.org/x/net v0.41.0 → v0.52.0 (CVE-2025-47911, CVE-2025-58190: html parse DoS) - golang.org/x/sys v0.33.0 → v0.42.0 - golang.org/x/text v0.26.0 → v0.35.0 - Go minimum version bumped to 1.25.0 (required by x/crypto v0.49.0) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
DPoPNonceMiddleware— the middleware was validating its own response header instead of the client's DPoP JWT nonce, meaning nonce validation always passed regardless of what the client sentGetOauthClient()inReturn()andgetOAuthSession()where errors were silently overwritten by the next:=assignmentReturn()to prevent credential leakage in log outputfmt.Println/fmt.Printf) that leaked session data to stdoutRef: #7
Details
DPoP Nonce Bypass (Critical)
In
DPoPNonceMiddleware, the code was:Fixed to validate the nonce from the client's DPoP JWT claims (
dpopClaims.Nonce), matching the correct pattern already used inOAuthMiddleware.Unchecked Errors
GetOauthClient()returns(*Client, error)but the error was being silently overwritten:Added proper error checks before proceeding.
Test plan
go build ./...passesgo vet ./...passesgo test ./...passes🤖 Generated with Claude Code