Skip to content

Conversation

@MegaManSec
Copy link

URLencode returnTo in appRouteHandlerFactory so the query params don’t break out into /auth/login and get forwarded to /authorize (e.g., scope, audience, etc).

This bug was found with ZeroPath.

…aram injection

URLencode returnTo in appRouteHandlerFactory so the query params don’t break out into /auth/login and get forwarded to /authorize (e.g., scope, audience, etc).

This bug was found with ZeroPath.

Signed-off-by: Joshua Rogers <[email protected]>
@MegaManSec MegaManSec requested a review from a team as a code owner October 29, 2025 06:18
@MegaManSec
Copy link
Author

cc/ @tusharpandey13 just fyi, too.

tusharpandey13 added a commit to tusharpandey13/nextjs-auth0 that referenced this pull request Nov 17, 2025
- URL encode returnTo parameter to prevent injection of OAuth parameters
- Add comprehensive unit tests for returnTo encoding scenarios
- Tests cover basic encoding, OAuth param injection attempts, and edge cases

Co-authored-by: Simen A. W. Olsen <[email protected]>
tusharpandey13 added a commit that referenced this pull request Nov 17, 2025
- URL encode returnTo parameter to prevent injection of OAuth parameters
- Add comprehensive unit tests for returnTo encoding scenarios
- Tests cover basic encoding, OAuth param injection attempts, and edge cases

Co-authored-by: Simen A. W. Olsen <[email protected]>
@tusharpandey13
Copy link
Contributor

This change is superseded by #2413. This was done to ensure that commits are signed. Orignal contribution history has been preserved. Hence closing this PR now.

@MegaManSec
Copy link
Author

history has been preserved

no it hasn't. I don't know who "Simen A. W. Olsen [email protected]" is but it isn't me and my commit here doesn't reference that name or email address at all. Was it ai generated or something?

@tusharpandey13
Copy link
Contributor

tusharpandey13 commented Nov 17, 2025

Hi @MegaManSec I sincerely apologize for this attribution error.

Can confirm that an AI workflow was used to created the rebased commit, which got confused with OP details.
I've added a correction to #2413, and will ensure the changelog is updated.

Thank you for calling this out, we'll make sure this doesn't happen again.

tusharpandey13 added a commit that referenced this pull request Nov 17, 2025
Credit Joshua Rogers (@MegaManSec) as the original author who
discovered and fixed the OAuth parameter injection vulnerability
in PR #2381.

This corrects an attribution error in PR #2413 where the commit
message incorrectly credited a different person.
@MegaManSec
Copy link
Author

Thank you.

For the record, I also did see this the now-deleted ai generated response with the "you're absolutely right" slop which ChatGPT likes to make.

IMG_5775

It's not obvious why this PR wasn't merged as-is: the commit was signed off, and now the git history has removed my authorship from my code -- which is very likely a copyright infringement.

@tusharpandey13
Copy link
Contributor

tusharpandey13 commented Nov 17, 2025

Yeah, i had to manually stop it and delete the ai-generated comment.

@MegaManSec
Copy link
Author

I would appreciate force-pushing a fix for the commit to properly include my information in the commit.

@MegaManSec
Copy link
Author

MegaManSec commented Nov 17, 2025

Also: if I report this via bugcrowd am I going to have to go through the typical waste of time to satisfy their triagers (which I'm already wasting my time with the other issue which has already been fixed)?

@tusharpandey13
Copy link
Contributor

FYI
v4.13.0 has been released with your changes and CHANGELOG has been updated: 817a4e2

Not sure if we can do a force push right now.

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