Skip to content

Conversation

@daffl
Copy link
Member

@daffl daffl commented Feb 2, 2026

This PR fixes three security issues in @feathersjs/authentication-oauth:

  • Open redirect via URL authority injection - The redirect query parameter was concatenated to the base origin without
    validation, allowing attackers to steal access tokens via URLs like https://target.com@attacker.com#access_token=secret
  • Origin validation bypass - The startsWith() check allowed attackers to bypass origin validation by registering
    domains like target.com.attacker.com when origin configuration does not end with /
  • Internal headers exposure - All HTTP request headers were stored in the session cookie (which is signed but not
    encrypted), could leak proxy headers like X-Forwarded-For or internal API keys

🤖 Co-created with https://claude.com/claude-code

Copy link
Member

@marshallswain marshallswain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are comprehensive and cover the attack vectors. The fixes look correct to me.

@daffl daffl merged commit ee19a0a into dove Feb 3, 2026
4 checks passed
@daffl daffl deleted the dl/oauth-redirect-validation branch February 3, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants