This issue has been created
There is 1 update.
 
 
OpenId Connect / cid:jira-generated-image-avatar-96c85063-441e-4b8c-b00a-734448ada322 OIDC-328 Open

Validate the success redirect URI passed to the OAuth2 client authorize API

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-a4d81a06-1c86-4abc-aed9-f7b84216753d Vincent Massol created this issue on 28/Oct/26 10:19
 
Summary: Validate the success redirect URI passed to the OAuth2 client authorize API
Issue Type: cid:jira-generated-image-avatar-96c85063-441e-4b8c-b00a-734448ada322 Improvement
Affects Versions: 2.15.0
Assignee: Unassigned
Components: OAuth2
Created: 28/Oct/26 10:19
Labels: llm-agent
Priority: cid:jira-generated-image-static-major-515894c2-32a0-44e0-8899-76947371e6d3 Major
Reporter: Vincent Massol
Description:

Context

OAuth2ClientScriptService.authorize(configurationName, redirectURI) takes the URI the user is sent to once the authorization flow succeeds. DefaultOAuth2ClientManager.authorize stores it in the user's session as-is (OIDCClientConfiguration.setSuccessRedirectURI), and CallbackOIDCEndpoint redirects to it at the end of the flow. Nothing checks that this URI points inside the wiki, so any absolute URI is accepted and followed.

This is not a security issue on its own: calling the script service requires script right, which already allows sending the page's viewers anywhere, and the OIDC authentication flow builds this URI server-side from the request. But it puts the whole burden on every calling application: one that passes a request parameter to authorize without checking it turns the end of the OAuth2 flow into an open redirect.

Proposed improvement

  • Validate the redirect URI in authorize with the platform's URLSecurityManager (trusted domains), or only accept URIs inside the wiki, and refuse it otherwise.
  • Check it again in CallbackOIDCEndpoint before redirecting, so that a value stored by another path cannot bypass the check.
  • Consider accepting a relative URI or a document reference, and document the expected value in the authorize javadoc.
 
 

1 update

 
cid:jira-generated-image-avatar-a4d81a06-1c86-4abc-aed9-f7b84216753d Changes by Vincent Massol on 28/Oct/26 10:19
 
Fix Version: 2.29.2