Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code injection vulnerability of alluxio.util.ShellUtils.isAlluxioRunning #18595

Open
ACE-777 opened this issue May 1, 2024 · 1 comment
Open
Labels
type-bug This issue is about a bug

Comments

@ACE-777
Copy link

ACE-777 commented May 1, 2024

Alluxio Version:
Version from 2.3.0 until the latest(2.9.3).

Describe the bug
Passing className with pipe and other command after className of unix shell as parameter of alluxio.util.ShellUtils.isAlluxioRunning(java.lang.String) can inject malicious commands.
For example, the following code ShellUtils.isAlluxioRunning("qwert | /usr/bin/gnome-calculator")
would finally execute bash -c ps -Aww -o command | grep -i \"[j]ava\" | grep qwert | /usr/bin/gnome-calculator. Malicious code will open Calculator.

To Reproduce
Just execute ShellUtils.isAlluxioRunning("qwert | /usr/bin/gnome-calculator") would reproduce it.

Urgency
Due to this vulnerability, any malicious code can be executed, so the impact is large.

Are you planning to fix it
I haven’t started working on PR yet and most likely I don’t plan to.

Additional context
For example if you have root rights you can execute ShellUtils.isAlluxioRunning("qwert | cd ../../../../../ | rm -rf /"), that all files in the system root directory have been deleted, which is extremely dangerous

@ACE-777 ACE-777 added the type-bug This issue is about a bug label May 1, 2024
@YichuanSun
Copy link
Contributor

Good question, would you like to fix it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug This issue is about a bug
Projects
None yet
Development

No branches or pull requests

2 participants