Recently I discovered multiple high severity vulnerabilities in Selectica Contract Lifecycle Management (SCLM) version 5.4. 

Cross-site Scripting (XSS)

There was no shortage of XSS in this app.  Here’s an example from a light scan with Burp Suite:

This is pretty easy to leverage for account takeover, even more so because the HTTPOnly flag was not set on the session cookie.

All you need to do is feed your victim a payload such as:

Run an netcat listener and receive the session cookie:
$ nc -l 80

Copy the cookie into your DOM, navigate to the site, and you have full account take over.  Easy peazy.

XML External Entity Injection (XXE)

This one is a little less exciting because it requires admin, but worth mentioning none the less.

The definition_upload_attach.jsp endpoint has an “XML_Template_1_Text” parameter, which allows for XML data to be transmitted to the server. The server’s XML settings allow for external XML entities to be called upon, which as a consequence, leads to data exfiltration and exposure. The server response does not return data other than a success or failure message; however, data can be retrieved out-of-band by using a remotely hosted document type definition (DTD) file.

As a proof-of-concept, I hosted a DTD file on a remote server, which contained the following content to retrieve the application server’s “win.ini” file:
$ cat ev.xml 

When the application server parses this crafted XML, it will retrieve and parse the “ev.xml” file, and it will be forced to send the requested data (the “win.ini” file contents) to the FTP server indicated in the hosted DTD file. During testing, it was determined that it was not possible to retrieve data over HTTP, so FTP was chosen as an alternative protocol.

$ python -m SimpleHTTPServer 8089

The  server connected to the web server to retrieve the DTD file, and once it had parsed it, the server connected over FTP to send the contents of win.ini.
$ python -m pyftpdlib

As you can see, the contents of wini.ini are sent over FTP.

Authenticated Code Execution

Ok, now here is the good stuff.  By default, any application user can achieve code execution on the server.  You don’t have to be admin.  The reason this happens is because all privilege roles are by default granted the “Can View and Run Reports” permission.

For example, take the “Contract Viewer” role.  This is the least privileged role in the application, yet as you see from the screenshot below, they still have permission to view and run reports.

To run a report, simple click the “Reports” tab in the top right from the home screen.

Once on the reports page, click the “Create” button.

After opening a new report, click “Use Scripted Condition” all the way on the right.

Once you have the script console, select “Groovy” from the drop-down menu.

Now if you are a frequent reader of my blog (Compromising Jenkins and extracting credentials) or have been hacking for more than a minute, you are probably aware of the raw power that a Groovy shell can grant. Without getting into the weeds, Groovy is basically a scripting language that gets complied and executed as Java. With this comes the ability to execute shell commands.

Here is a simple example of executing calc.exe on a Windows server:

Of course as an attacker you can replace that with anything, such as a command to download and execute payload.

Cross-site Request Forgery (CSRF) -> Remote Code Execution (RCE)

We know now that any user can shell the server, but what if we were unable to discover any user passwords?  There is also CSRF.  I first stripped down the POST request to execute the groovy code:

One way to get the user to execute this payload is by using a Burp suite generated CSRF payload like the one below:

This would require that you cause the victim to browse to your malicious page, which would then execute a POST request.  While this is pretty effective, we can make it even easier by just passing all of the POST parameters in a GET request like so:

This is preferred, as now we can get a victim to execute the payload simple by rendering an image tag like this:

If the victim attempts to load the image while authenticated, the payload will execute.


After finding these vulnerabilities I reached out to Determine (The creators of SCLM) and let them know that I had discovered multiple critical vulnerabilities in their software. A transcript can be found below:


My name is Esteban Rodriguez.  I am a security researcher and information security consultant.  Recently while testing a client, I came across an install of Selectica CLM.  During my work with that client, I discovered many security vulnerabilities in the product.  I would like to make Determine/Selectica aware of these vulnerabilities, so that an update or patch may be issued to protect current users of the software.
I intend to follow the Google’s Project Zero guidelines for vulnerability disclosure as documented here:
Please let me know where I can send technical details, so that the relevant teams may become aware of the security issues.
If you have any further questions for me, feel free to email me and I would be happy to explain further.
Thank you for your time,
Esteban Rodriguez

They asked what version this was for, and I responded that it was for version 5.4.  They then responded:

The current CLM software version is 6.11 that have passed penetration and security vulnerabilities.  We have encouraged all customers to upgrade or migrate to DCP platform.

I responded back:

Thank you for your response.

Is 6.11 a paid upgrade?  If so, would you like the details of the vulnerability so that a patch can be made available for 5.4 and below?
They responded:
Yes 6.11 is a paid upgrade.
We have communicated a while back that 5.4 or below is on support as is with no further software patches/updates.
Because this software is not open source, and I did not have any copy of the software other than 5.4, I was unable to verify if these vulnerabilities were also present in the latest version of the software.
Update: I was later able to confirm that none these vulnerabilities were fixed, and at the time of this writing all version are exploitable.


If your organization uses this software, you can perform the following actions to mitigate some of the risk from these vulnerabilities:

  • Migrate to a software platform that provides continuous security support.  While this is likely the most costly option, it is important that any software you run in your organization is not end of life.
  • Upgrade to version 6.11.  This has an unknown cost, however according to Determine this version has gone through some form of penetration test. It is unknown however if these specific vulnerabilities have been addressed. Vulnerabilities confirmed to still be present.
  • Remove the “Can View and Run Reports” permission for all roles.  While this may impact workflow, it is necessary to secure the application.
  • Do not expose the application to the internet. If possible, make the application available only from your internal network.


Reserved CVEs:
CVE-2019-20153 (XXE)
CVE-2019-20154 (XSS)
CVE-2019-20155 (RCE)

Bonus finding:

It is also possible to dump the application users by visiting:


Unlike most of the the files in the web root, this file does not include:

to see if the user is authenticated.  This information would be very useful for password spraying.