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

Expression Language Injection Security Risk #49

Closed
Ramos-dev opened this issue Jan 17, 2019 · 1 comment
Closed

Expression Language Injection Security Risk #49

Ramos-dev opened this issue Jan 17, 2019 · 1 comment

Comments

@Ramos-dev
Copy link

Ramos-dev commented Jan 17, 2019

Just like spring el\ognl\jstl,alibba QLexpress alse allow programmer to directly call the Java Object to execute the method using the java reflection mechanism,
image
but there is no any security restrictions that rise a security risk while editing rules, just like that poc:
image
so,that cause a remote code execution;
Although it is a feature, there are security risks in design.
fix:

  1. Use java.lang.SecurityManager to protected JVM;
  2. Prevent against by blacklist(Runtime\ ScriptEngine\FileAccess...);
  3. Create a property setting that allows access to java or not.
    see more at:
    https://wooyun.js.org/drops/%E4%B8%80%E7%A7%8D%E6%96%B0%E7%9A%84%E6%94%BB%E5%87%BB%E6%96%B9%E6%B3%95%E2%80%94%E2%80%94Java-Web-Expression-Language-Injection.html
    https://www.owasp.org/index.php/Expression_Language_Injection
    http://danamodio.com/tag/expression-language-injection/
    https://www.owasp.org/images/7/7e/Owasp_SSTI_final.pdf
    @baoxingjie
@baoxingjie
Copy link
Contributor

Your suggestions is very good,currently QlExpress is just a tool,it can do every things by calling java reflection methods.
As a El user and the application's owner,You should forbidden some words before calling EL executor.
By the way, I will also add a forbidden words feature in the project.

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

No branches or pull requests

2 participants