Skip to content

Cross-Site Scripting header.tag #1521

Open
@irbishop

Description

@irbishop

header.tag appears to be vulnerable to XSS here:

		// get the info of the current user, if available (null otherwise)
    	function getUserInfo() {
    		return ${userInfoJson};
    	}

userInfoJson is included in the page and is not encoded so malicious elements could be created. If the string </script> appears in userInfoJson, the <script> element will be closed
and a new malicious <script> can be created:

        // get the info of the current user, if available (null otherwise)
    	function getUserInfo() {
    		return {"sub":"12318767","name":"Test</script><script>alert(1)</script> Test","preferred_username":"Test","given_name":"Test</script><script>alert(1)</script>","family_name":"Test","email":"[email protected]","email_verified":true};
    	}

openid_xss2

And the malicious JavaScript is executed:

openid_xss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions