v0.1.20 — fix(oidc): reject token requests when codeChallengeMethod is not S256
{"content":"# Release v0.1.20: PKCE Downgrade Path Closed\n\nFebruary 26, 2026\n\n## What changed\n\n- 🔒 PKCE security fix: The OIDC token endpoint now strictly requires S256 code challenge method. Requests with null or non-S256 methods are rejected with invalid_grant, eliminating a downgrade path where the insecure plain PKCE method could be silently accepted.\n- 🧹 Removed dead code path in verifyPkce() that supported the deprecated plain method.\n- ✅ Added 20 test cases covering the vulnerability, the fix, and valid S256 flows.\n\n## Why it matters\n\nPKCE (Proof Key for Code Exchange) prevents authorization code interception attacks. The plain method provides no security benefit — the code verifier equals the challenge, making it useless as a proof. This fix ensures that any authorization code with a corrupted or missing challenge method cannot be exchanged for tokens, closing a potential bypass.\n\n## Technical notes\n\nNo breaking changes. All clients using S256 PKCE (the only supported method) are unaffected. Authorization codes stored with null or non-S256 challenge methods will be rejected at token exchange time.","date":"February 26, 2026","title":"Release v0.1.20: PKCE Downgrade Path Closed"}
Release Notes
✅ PR #428 merged and release v0.1.20 confirmed.
PR #428 — fix(oidc): reject token requests when codeChallengeMethod is not S256
- Merged via squash merge → commit
6ebb83df - Release tag
v0.1.20already exists in the repository (no duplicate was created)
What was released:
- 🔒 Security fix in the OIDC token endpoint (
src/app/oidc/token/route.ts): eliminated a PKCE downgrade path where anullcodeChallengeMethodin the database would silently fall back to the insecureplainPKCE method. The endpoint now strictly requiresS256and returnsinvalid_grantfor any other value (includingnull). - 🧹 Removed the dead
plainbranch fromverifyPkce(). - ✅ 20 new test cases in
tests/app/oidc/token-pkce.test.tscovering the vulnerability, the fix, and valid S256 flows. - No breaking changes for clients using S256 PKCE (the only supported method).