You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Server Side Template Injection/Java.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,7 @@ New version of Pebble :
214
214
> Apache Velocity is a Java-based template engine that allows web designers to embed Java code references directly within templates.
215
215
216
216
In a vulnerable environment, Velocity's expression language can be abused to achieve remote code execution (RCE). For example, this payload executes the whoami command and prints the result:
A more flexible and stealthy payload that supports base64-encoded commands, allowing execution of arbitrary shell commands such as `echo "a" > /tmp/a`. Below is an example with `whoami` in base64:
230
+
229
231
```java
230
232
#set($base64EncodedCommand = 'd2hvYW1p')
231
233
@@ -256,6 +258,7 @@ A more flexible and stealthy payload that supports base64-encoded commands, allo
0 commit comments