4
4
<overview >
5
5
<p >
6
6
Jakarta Expression Language (EL) is an expression language for Java applications.
7
- There are a single language specification and multiple implementations
7
+ There is a single language specification and multiple implementations
8
8
such as Glassfish, Juel, Apache Commons EL, etc.
9
9
The language allows invocation of methods available in the JVM.
10
10
If an expression is built using attacker-controlled data,
11
- and then evaluated, then it may allow the attacker to run arbitrary code.
11
+ and then evaluated, it may allow the attacker to run arbitrary code.
12
12
</p >
13
13
</overview >
14
14
15
15
<recommendation >
16
16
<p >
17
17
It is generally recommended to avoid using untrusted data in an EL expression.
18
- Before using untrusted data to build an EL expressoin , the data should be validated
19
- to ensure it is not evaluated as expression language. If the EL implementaion offers
20
- configuring a sandbox for EL expression , they should be run in a restircitive sandbox
18
+ Before using untrusted data to build an EL expression , the data should be validated
19
+ to ensure it is not evaluated as expression language. If the EL implementation offers
20
+ configuring a sandbox for EL expressions , they should be run in a restrictive sandbox
21
21
that allows accessing only explicitly allowed classes. If the EL implementation
22
- does not allow sandboxing, consider using other expressiong language implementations
22
+ does not support sandboxing, consider using other expression language implementations
23
23
with sandboxing capabilities such as Apache Commons JEXL or the Spring Expression Language.
24
24
</p >
25
25
</recommendation >
@@ -32,9 +32,9 @@ using the JUEL interpreter:
32
32
<sample src =" UnsafeExpressionEvaluationWithJUEL.java" />
33
33
34
34
<p >
35
- JUEL does not allow to run expression in a sandbox. To prevent running arbitrary code,
36
- incoming data has to be checked before including to an expression. The next example
37
- uses a Regex pattern to check whether a user tries to run an allowed exression or not:
35
+ JUEL does not support to run expressions in a sandbox. To prevent running arbitrary code,
36
+ incoming data has to be checked before including it in an expression. The next example
37
+ uses a Regex pattern to check whether a user tries to run an allowed expression or not:
38
38
</p >
39
39
<sample src =" SaferExpressionEvaluationWithJUEL.java" />
40
40
0 commit comments