Skip to content
RCE Write-up Advanced

CVE-2024-45195: Apache OFBiz Unauthenticated Remote Code Execution (Fixed)

Apache OFBiz before 18.12.16 allows unauthenticated remote code execution because view authorization checks can be bypassed by desynchronising the controller and view map state. An attacker can access admin-only views such as XmlDsDump to dump database contents or execute arbitrary Groovy code.

Ryan Emmons Follow

Published on rapid7.com

Apache OFBiz below 18.12.16 is vulnerable to unauthenticated remote code execution on Linux and Windows. An attacker with no valid credentials can exploit missing view authorization checks in the web application to execute arbitrary code on the server.

Rapid7, on rapid7.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 uses different parsing methods for the controller and view map parts of the URL, allowing them to be desynchronised so that an unauthenticated controller is paired with an authenticated view map.

Impact

An unauthenticated attacker could execute arbitrary code on the server or access sensitive data such as password hashes and credit card numbers.

What the attacker needed

No credentials required; Network access to the OFBiz instance

How it was found

  1. Send a request to an unauthenticated endpoint with a path that includes an authenticated view name, such as /webtools/control/forgotPassword/xmldsdump.
  2. Include parameters to specify the output file path, filename, and entity names to dump (e.g., UserLogin, CreditCard).
  3. The server processes the request, writing the dumped data to a file in a web-accessible directory.
  4. Retrieve the dumped file via a second unauthenticated request to confirm success.

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 OFBiz is a business application. It has some admin-only pages that can run code or export data. The software mistakenly lets a visitor reach those pages without logging in by confusing how it works out which page to show. This means an attacker can run commands on the server or steal data.

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.