You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blazor samples use return URLs without validating them #692
Several Blazor samples use a return URL from the query string or a form without checking that it points back to the app. A crafted link can send users to another site, and in some samples a javascript: return URL runs script on the app's origin.
Example: in BlazorWebAssemblyStandaloneWithIdentity, signing in via /login?ReturnUrl=javascript:alert(document.domain) runs the script. In the general Blazor samples, clicking the "Return" link on /pet-detail/1?ReturnUrl=javascript:alert(document.domain) runs it.
Affected:
GetAuthProperties in LoginLogoutEndpointRouteBuilderExtensions.cs in the OIDC and Entra BFF samples (8.0 to 10.0): ReturnUrl=//evil.example becomes the authentication redirect URI, so users land on that site after they sign in or out.
Login.razor in BlazorWebAssemblyStandaloneWithIdentity (8.0 to 10.0): navigates to ReturnUrl after sign-in without checking it (open redirect and javascript: URLs).
changed the title [-]Blazor OIDC, Entra and Identity samples allow open redirects through return URLs[/-][+]Blazor samples use return URLs without validating them[/+]on Nov 24, 2026
Activity
[-]Blazor OIDC, Entra and Identity samples allow open redirects through return URLs[/-][+]Blazor samples use return URLs without validating them[/+]Validate return URL in PetDetail sample