Skip to content
RCE Write-up Advanced

Arbitrary Command Execution in Metadata Hub (CVE-2024–37382)

The AB Initio Metadata Hub web application allowed an admin user to configure environment variables such as the database import URL, which were passed to a shell command without adequate sanitisation. An attacker with admin access could inject arbitrary system commands, leading to command execution on a machine with access to organisational databases.

medium.com

Published on medium.com

During a penetration testing activity, our team identified a vulnerability in the AB Initio Metadata Hub platform. This vulnerability allows the execution of arbitrary system commands by manipulating environment variables that can be partially configurable via the web application.

InTheCyber, on medium.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

Likely the application passed user-controlled configuration values into a shell command without sufficient escaping, allowing command injection despite some URL validation.

Impact

An attacker with admin access could execute arbitrary commands on a machine that had access to the organisation's databases, potentially leading to data exposure or compromise.

What the attacker needed

Admin access to the web application

How it was found

  1. Log in to the web application as an admin user and open the panel for running test commands.
  2. Run the command `mh-import database test` and observe that the configured URL appears as an argument.
  3. Modify the `urlFromImporter` parameter and observe that the change is reflected in the command output.
  4. Trigger errors to learn that commands are processed by Python with `shlex` and executed in a `ksh` shell.
  5. Try various injection points in the URL, then insert the complete URL twice to bypass validation.
  6. Redirect the command output to stderr to confirm successful command injection.

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.

A web application let an administrator change a setting that was later used inside a system command. Because the setting was not properly cleaned, an attacker could add extra commands that the server would run, giving them control over the machine.

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.