Skip to content
RCE Write-up Advanced

Executive Summary: CVE-2020-13942

Apache Unomi evaluated user-supplied MVEL and OGNL expressions without proper restrictions, allowing remote attackers to execute arbitrary code. The patch for a previous RCE was insufficient because it only filtered class loading via loadClass(), which could be bypassed.

checkmarx.com

Published on checkmarx.com

“Apache Unomi is a Java Open-Source customer data platform, a Java server designed to manage customers, leads and visitors’ data and help personalize customers experiences,” according to its website. Unomi can be used to integrate personalization and profile management within very different systems such as CMSs, CRMs…

The author, on checkmarx.com

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

The application evaluated user-controlled expression language (MVEL/OGNL) without adequate sandboxing; the attempted fix relied on intercepting class loading via loadClass(), which can be bypassed by using already-instantiated classes or reflection.

Impact

An unauthenticated attacker could execute arbitrary OS commands on the Unomi server, leading to complete compromise of confidentiality, integrity, and availability, and potentially use it as a stepping stone into internal networks.

What the attacker needed

Unauthenticated network access to the public endpoint

The fix

The vulnerabilities were fixed in version 1.5.2 by removing support for arbitrary EL expressions and using static expressions with dynamic parameters instead.

How it was found

  1. Send an HTTP request to a public endpoint with a condition parameter containing a MVEL expression that uses Runtime to execute an OS command.
  2. Alternatively, send an HTTP request with an OGNL expression that uses reflection to obtain Runtime and execute an OS command.

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.

Apache Unomi is a server that stores customer data. It lets users write special expressions to filter data, but it did not check these expressions properly. An attacker could send a request that makes the server run any command, taking over the system.

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.