Skip to content

Fix redirect URI security vulnerability and improve documentation - #305

Open
niklaswallerstedt wants to merge 1 commit into
anomalyco:masterfrom
niklaswallerstedt:fix/redirect-uri-security-and-docs
Open

Fix redirect URI security vulnerability and improve documentation#305
niklaswallerstedt wants to merge 1 commit into
anomalyco:masterfrom
niklaswallerstedt:fix/redirect-uri-security-and-docs

Conversation

@niklaswallerstedt

Copy link
Copy Markdown

Fix redirect URI security vulnerability

Resolves #299

Fixes malformed URL bypass vulnerability where redirect_uri=https:evil.com could redirect to external domains. The fix ensures proper validation and returns HTTP 400 for
invalid redirect URIs.

Also adds comprehensive security documentation explaining the default behavior and providing guidance for implementing stricter per-client validation in production environments.

@niklaswallerstedt
niklaswallerstedt force-pushed the fix/redirect-uri-security-and-docs branch 2 times, most recently from 2d664d2 to 2d77dfc Compare October 21, 2025 09:08
@niklaswallerstedt
niklaswallerstedt marked this pull request as ready for review October 21, 2025 09:09
@niklaswallerstedt
niklaswallerstedt marked this pull request as draft October 21, 2025 13:31
@niklaswallerstedt
niklaswallerstedt marked this pull request as ready for review October 21, 2025 16:07
@niklaswallerstedt
niklaswallerstedt force-pushed the fix/redirect-uri-security-and-docs branch 3 times, most recently from 36ca824 to ed24743 Compare October 26, 2025 07:50
…malyco#299))

Fix malformed URL bypass where for instance redirect_uri=https:evil.com could redirect to external domains. Returns HTTP 400 for invalid redirect URIs based on default allow hook.
@shpaw415

Copy link
Copy Markdown

Are you interested in applying your patch in that fork of the project? https://github.com/kagii-dev/openauth
if you are not interessted just drop a comment and i will make a PR myself and credit you as the auhtor.

andrewmd5 added a commit to 6over3/openauth that referenced this pull request Apr 26, 2026
Cherry-picks from anomalyco/openauth open PRs:

- anomalyco#305 spec-compliant redirect_uri (require `allow`, RFC 9700 §4.1)
- anomalyco#309 client-side JWT audience validation (RFC 7519 §4.1.3)
- anomalyco#318 token_type=Bearer on token responses
- anomalyco#304 implicit-flow no refresh token (RFC 6749 §4.2.2)
- anomalyco#258 iat claim (deterministic across reuse interval)
- anomalyco#323 fix Cloudflare KV runaway key creation under eventual consistency
- anomalyco#315 loosen CloudflareStorageOptions to structural KV shape
- anomalyco#319 refresh callback hook
- anomalyco#156 OAuth2 scope (authorize, token, well-known, JWT claim)
- anomalyco#236 basePath option
- anomalyco#278 allowRegistration / userExists / allowClaims
- anomalyco#221 configurable Select copy
- anomalyco#310 anomalyco#308 code UI resend action + sendCode types
- anomalyco#325 example actions: keep session when access token still valid
- anomalyco#317 add MIT license to package.json

Bump 0.3.12 -> 0.4.0 (breaking: `allow` is now required).
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.

Critical: Open redirect due to missing redirect_uri validation

2 participants