Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Servlets Post 2.1.0, API 2.2.0
-
None
Description
A POST request including a <script> in the URL can lead to execution of that script in the browser:
http://localhost:4502/does/not/exist.html/%22%3e%3cscript%3ealert(29679)%3c/script%3e
Test with curl:
curl -X POST "http://localhost:4502/does/not/exist.html/%22%3e%3cscript%3ealert(29679)%3c/script%3e"
I think this applies to both org/apache/sling/api/servlets/HtmlResponse and org/apache/sling/servlets/post/HtmlResponse, but not sure how to trigger the first one.