Skip to content
RCE Write-up Advanced

Analysis Of Multiple Vulnerabilities In Ofbiz

Apache OFBiz had an authentication bypass in its XML-RPC endpoint that allowed unauthenticated attackers to send crafted requests, leading to remote code execution. The root cause was a logic flaw in the login check that could be bypassed by adding a parameter, and later a Groovy program export endpoint was also abused.

SecureLayer7 Follow

Published on blog.securelayer7.net

Vulnerability Research

SecureLayer7 (@SecureLayer7), on blog.securelayer7.net

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

What the attacker needed

Network access to the OFBiz instance; No authentication required

The fix

The fix involved replacing the old login check with UtilValidate.isEmpty for better handling of null and empty values, and preventing processing with requiredPasswordChange to avoid the authentication bypass.

How it was found

  1. Set up a vulnerable OFBiz instance and start it with debugging enabled.
  2. Send an XML-RPC request to the /webtools/control/xmlrpc endpoint containing a serialized payload.
  3. Observe that a file is created in the /tmp directory, confirming code execution.
  4. For the authentication bypass, add username, password, and requirePasswordChange=Y parameters to the request.
  5. Send the request to the same endpoint and observe that the file is created again, bypassing authentication.
  6. For the Groovy variant, send a request to /webtools/control/programexport with a groovyProgram parameter containing a 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 OFBiz is a business application. A part of it that handles special XML requests did not properly check if the user was logged in. An attacker could send a malicious request without logging in and run 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.

More by SecureLayer7

View all

1 more disclosed report, best first.

More from Ofbiz

View all

The newest disclosed reports for this program.

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.