# XSS on error page

While I was looking for Business Logic Flaws on this target, I wondered what the response would be if I provided the wrong credentials.

When I entered the wrong credential, an error page appeared along with a message "Invalid Username/Password"\
\
The URL looked like : <https://example.com/login?errorCd=views.login.email.password.required\\>
So I tampered the parameter to XSS payloads. However, the payloads were not executing.

\
I then tried SSTI payloads and one of them got executed. The final PoC link looked like:\
<https://example.com/login?errorCd=\\{{2\\*2\\}}\\>
and the error message displayed "4"<br>

I reported it under Client Side Template Injection but later it was categorized by the triager as XSS 🤷‍♂️.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://utkarsh24122.gitbook.io/findings/xss/xss-on-error-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
