Potential XSS Vulnerabilty where ESP URL can be changed to send specific target to IDP

  • 7022126
  • 18-Oct-2017
  • 07-Nov-2017

Environment

Access Manager 4.3
Access Manager 4.2

Situation

Access Manager offers the ability to define a whitelist of restricted targets to lock down on potential cross site scripting attacks at https://www.netiq.com/documentation/access-manager-42/admin/data/b1ax6f15.html#idprovider. If this is not enabled, there is also the possibility of modifying the AuthnRequest from the AG to the IDP with some injections to cause such an XSS attack. An example would include the following:
 
1. Access a Protected resource.
2. Take the corresponding esp URL generated to be sent to the IDP server
3. modify it as show below adding parameters after the contract URI:
The response of this request is below:
 
<html>
    <head>
       <META HTTP-EQUIV="expires" CONTENT="0">
    </head>
    <body>
        <form method="POST" enctype="application/x-www-form-urlencoded" action="https://nam43idp.lab.novell.com/nidp/idff/sso">
    <input type="hidden" name="target" value="%22/%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20|%3Cscript%3Ealert(1)%3C/script"/>
            <input type="hidden" name="LAREQ" value="PGxpYjpBdXRoblJlcXVlc3QgeG1sbnM6bGliPSJ1cm46bGliZXJ0eTppZmY6MjAwMy0wOCIgeG1sbnM6YWM9InVybjpsaWJlcnR5OmFjOjIwMDMtMDgiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjEuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoxLjA6cHJvdG9jb2wiIElzc3VlSW5zdGFudD0iMjAxNy0wMS0xOVQyMzoyNDoxMloiIE1ham9yVmVyc2lvbj0iMSIgTWlub3JWZXJzaW9uPSIyIiBSZXF1ZXN0SUQ9ImlkWGEtUjJWUzVHQnE3VDU1cnNING9UQ1JHNXBFIiBsaWI6Y29uc2VudD0idXJuOmxpYmVydHk6Y29uc2VudDp1bmF2YWlsYWJsZSI+PGxpYjpQcm92aWRlcklEPmh0dHBzOi8vbXNpbmdoNy5sYWIubm92ZWxsLmNvbTo0NDMvbmVzcC9pZGZmL21ldGFkYXRhPC9saWI6UHJvdmlkZXJJRD48bGliOk5hbWVJRFBvbGljeT5vbmV0aW1lPC9saWI6TmFtZUlEUG9saWN5PjxsaWI6Rm9yY2VBdXRobj5mYWxzZTwvbGliOkZvcmNlQXV0aG4+PGxpYjpJc1Bhc3NpdmU+ZmFsc2U8L2xpYjpJc1Bhc3NpdmU+PGxpYjpQcm90b2NvbFByb2ZpbGU+aHR0cDovL3Byb2plY3RsaWJlcnR5Lm9yZy9wcm9maWxlcy9icndzLWFydDwvbGliOlByb3RvY29sUHJvZmlsZT48bGliOlJlcXVlc3RBdXRobkNvbnRleHQ+PGxpYjpBdXRobkNvbnRleHRTdGF0ZW1lbnRSZWY+c2VjdXJlL25hbWUvcGFzc3dvcmQvdXJpPC9saWI6QXV0aG5Db250ZXh0U3RhdGVtZW50UmVmPjwvbGliOlJlcXVlc3RBdXRobkNvbnRleHQ+PGxpYjpSZWxheVN0YXRlPk1BPT08L2xpYjpSZWxheVN0YXRlPjwvbGliOkF1dGhuUmVxdWVzdD4="/>
        </form>
        <script language="JavaScript">
            <!--
                document.forms[0].submit();
            -->
        </script>
    </body>
</html>
 
You can see that the modified url now is a part of the response body.

Resolution

fixed in NAM 4.2.5 and NAM 4.3.3 (already fixed in NAM 4.0).

Additional Information

The XSS formed request will trigger a 400 status response.