XXE injection in POST request to /affwebservices/router in Web Agent Option Pack in SiteMinder
search cancel

XXE injection in POST request to /affwebservices/router in Web Agent Option Pack in SiteMinder

book

Article ID: 460506

calendar_today

Updated On:

Products

CA Single Sign On Agents (SiteMinder) CA Single Sign On Federation (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) SITEMINDER

Issue/Introduction

  • Running Federation Web Services (FWS) exposes an XML External Entity (XXE) injection vulnerability [1] in the POST request to /affwebservices/router.
  • The vulnerability allows an attacker to read the /etc/passwd file of the server [1].

Environment

  • SiteMinder Web Agent Option Pack 12.52 SP1 CR09
  • Apache Tomcat 9.0.112
  • Red Hat Enterprise Linux 8

Cause

In web.xml of the affwebservices application, the router servlet is mapped to org.apache.soap.server.http.RPCRouterServlet. This servlet is exploitable by XXE injection [2].

The affwebservices.war file compiled with a Web Agent Option Pack older than 12.52 SP1 CR06 still contains this servlet definition.

Resolution

Fixed in Web Agent Option Pack 12.52 SP1 CR06. The router servlet definition is removed out of the box from that release onward [2].

Option 1: Upgrade and compile again (recommended when affwebservices.war was compiled with an older Web Agent Option Pack)

  1. Upgrade the Web Agent Option Pack to 12.52 SP1 CR09.
  2. Compile the affwebservices.war file again with the upgraded Web Agent Option Pack.
  3. Deploy the new affwebservices.war file to Tomcat, and restart Tomcat.
  4. Send the POST request to /affwebservices/router again. The server returns an HTTP 404 error, and the attack is blocked [2].

Option 2: Workaround, comment out the router servlet

  1. Stop Tomcat.
  2. Open the web.xml file of the affwebservices application.
  3. Comment out the router servlet definition [3]:

    <!--
    <servlet>
        <servlet-name>router</servlet-name>
        <display-name>Apache-SOAP RPC Router</display-name>
        <description>This is the main servlet that dispatches the SOAP requests to registered web services</description>
        <servlet-class>org.apache.soap.server.http.RPCRouterServlet</servlet-class>
        <init-param>
          <param-name>faultListener</param-name>
          <param-value>org.apache.soap.server.DOMFaultListener</param-value>
        </init-param>
      </servlet>
    -->


    4. Start Tomcat.
    5. Send the POST request to /affwebservices/router again. The server returns an HTTP 404 error, and the attack is blocked [2].

FWS does not use the Apache SOAP RPC router servlet, so removing the definition does not affect FWS functions [3].

Additional Information

  1. XML External Entity (XXE) Processing

  2. Is XXE injection to /affwebservices/router/session still applicable in the current version of Access Gateway?

  3. Federation Web Services URLs Used by the Product