Skip to content
RCE Write-up Advanced

How I Chained 4 Bugs (Features?) into RCE on Amazon Collaboration System

A path normalisation inconsistency between Nuxeo's authentication filter and the Tomcat servlet container allowed bypassing access controls, and chaining this with Seam framework features (actionMethod, double EL evaluation, and a blacklist bypass) led to remote code execution. An attacker could execute arbitrary commands on the server without authentication.

blog.orange.tw

Published on blog.orange.tw

Hi! This is the case study in my Black Hat USA 2018 and DEFCON 26 talk, you can also check slides here:

The author, on blog.orange.tw

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the authentication filter truncated the request URI at semicolons to handle URL path parameters, while Tomcat did not, so the filter and the servlet container disagreed on which page was being requested.

Impact

An unauthenticated attacker could execute arbitrary commands on the server, leading to full remote code execution.

What the attacker needed

Nuxeo running on Tomcat; Seam framework present; No authentication required

The fix

Nuxeo released version 8.10 which overrides the callAction() method to fix the double evaluation feature; JBoss declined to patch Seam due to end-of-life.

How it was found

  1. Craft a request whose URI contains a semicolon so that the authentication filter sees a whitelisted prefix (login.jsp) but Tomcat routes to a different, protected resource.
  2. Use the bypass to reach an unauthorised Seam servlet.
  3. Invoke the Seam actionMethod parameter with a filename and EL code that references a file under the context root containing an expression.
  4. Place a second-stage payload in the directoryNameForPopup HTTP parameter so that the returned string is evaluated again as EL.
  5. Bypass the EL blacklist by using array-like operators to avoid blocked patterns.
  6. Use Java reflection to obtain a Runtime instance and execute a command, then receive a reverse shell.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The application tried to check whether a request was allowed by looking at only part of the web address, but the underlying web server interpreted the full address differently. This mismatch let the attacker sneak past the login check. Once inside, they abused features of an old Java framework to run their own commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.