CVE-2022–45875: Command Injection Vulnerability in Apache Dolph
The alert script execution module concatenated user-controlled title, content and userParams into a shell command without sanitisation. An attacker could inject arbitrary shell commands and run them with the application's privileges.
Published on sahnounoussama.medium.com
Apache DolphinScheduler is a widely used distributed and visual workflow scheduler designed to orchestrate complex data pipelines. However, a severe command injection vulnerability (CVE-2022–45875) was discovered in its alert script execution module.
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
User-controlled values were concatenated into a shell command string passed to /bin/sh -c without escaping or validation.
Impact
An attacker could execute arbitrary commands, potentially leading to a full system compromise, such as deleting files or opening a reverse shell.
What the attacker needed
Ability to control alert title, content or userParams; alert script plugin configured; non-Windows host
The fix
The vulnerability was addressed in newer releases; input should be escaped or validated and ProcessBuilder used with separate arguments.
How it was found
- Craft a malicious value for the title, content or userParams parameter.
- Submit it so the alert script execution builds the shell command.
- The injected commands run with the application's privileges.
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.
When a program builds a command for the operating system by gluing together text that a user can supply, a user can include extra shell instructions. Here the alert title and message were placed inside a shell command, so a crafted title could make the server run other commands. This is called command injection.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.