Skip to content

Enforce session-only identity for password-change (remove bearer-token fallback)#121

Merged
markwylde merged 2 commits intomainfrom
codex/propose-fix-for-otp-bypass-vulnerability
Mar 10, 2026
Merged

Enforce session-only identity for password-change (remove bearer-token fallback)#121
markwylde merged 2 commits intomainfrom
codex/propose-fix-for-otp-bypass-vulnerability

Conversation

@markwylde
Copy link
Copy Markdown
Member

Motivation

  • Prevent a 2FA bypass where password-change endpoints could accept a bearer JWT fallback when session validation failed, allowing password-only authentication to circumvent OTP enforcement.

Description

  • Removed the bearer-token fallback and JWT verification from requirePasswordChangeIdentity so identity for password-change flows is derived only from requireSession and therefore subject to existing OTP/session checks.
  • Cleaned up unused imports in packages/api/src/controllers/user/passwordAuth.ts as part of the change.

Testing

  • Ran npm run tidy, which completed (reported lint/info warnings but no failures).
  • Ran npm run build, which completed successfully though brochureware PDF generation emitted platform warnings about missing system libraries; overall build succeeded.

Codex Task

@markwylde markwylde merged commit 2ea730c into main Mar 10, 2026
17 checks passed
@markwylde markwylde deleted the codex/propose-fix-for-otp-bypass-vulnerability branch March 10, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant