Security: Reflected XSS via access_url_id/add_type attribute breakout in access_url edit admin pages - #8792
Merged
AngelFQC merged 2 commits intoAug 1, 2026
Conversation
…ccess_url_edit_users_to_url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardens the
add_typeandaccess_url_idrequest parameters in the multi-URL admin pages, where they were sanitized only withSecurity::remove_XSS()(which does not escape for HTML-attribute context) — or, in one page, not sanitized at all — and then reflected intohref/ hidden-inputvalueattributes and an inline JS string.add_typeis now restricted to its two valid values through an allowlist ('unique'or'multiple'), so no attacker-controlled text can reach the output.access_url_idis cast to(int).Applied to the reported page and its sibling admin pages that share the same pattern:
public/main/admin/access_url_edit_users_to_url.phppublic/main/admin/access_url_edit_courses_to_url.phppublic/main/admin/access_url_edit_usergroup_to_url.phppublic/main/admin/access_url_edit_course_category_to_url.php(access_url_idwas already(int))All of these pages are gated behind
api_protect_global_admin_script().Refs GHSA-3rmg-cx7r-rcqh