XSS by changing file names
Testing vulnerability by injecting malicious scripts in filenames to bypass security measures and execute unauthorized code.
Cross-site scripting (XSS)
How this template works
APIs Selection
The API selection filters in this template specify the conditions that the response of the API request must meet in order for the test to be executed. In this case, the filters check if the response code is between 200 and 299 and if the response payload contains the HTML doctype declaration "<!doctype html>".
Execute request
The execute section of the template defines the modifications to be made to the query parameters and body parameters of the API request. It injects a malicious script into the file names by modifying the values of the "jpg_file_name", "jpeg_file_name", and "png_file_name" parameters.
Validation
The validation section specifies the expected response from the API request. It checks if the response payload contains the script tag "<script>alert(document.domain)</script>" and if it contains the HTML doctype declaration "<!doctype html>". If both conditions are met, the test is considered successful.
Frequently asked questions
What is the purpose of the XSS_VIA_FILE_NAME test
What is the impact of an XSS vulnerability
What are the selection filters used in the API for this test
How does the test modify query and body parameters
What is the purpose of the validate section in the test
What are some references for further information on XSS vulnerabilities
"The text editor in Akto is absolutely remarkable. Its user-friendly YAML format strikes the perfect balance between simplicity and power. With intuitive features like 'API selection filter', 'Execute', Validate' creating test rules becomes incredibly easy. Akto's test editor is a game-changer, enabling seamless creation of highly personalized and effective tests that could meet the needs of any modern day organization. "

Security team,
Rippling