> For the complete documentation index, see [llms.txt](https://vida03.gitbook.io/redteam/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vida03.gitbook.io/redteam/web/cve-2023-38964.md).

# CVE-2023-38964

## Introduction

I was searching for an LMS (Learning Management System), which is like a CMS (Content Management System) but specifically designed for managing courses. During my search, I came across "**Academy LMS 6.0"**. I purchased this product and decided to test it for vulnerabilities before uploading my courses and deploying it on my site.

## Code Analysis

At **application > controllers > Home.php**, on line 855, we found the search function, and on lines **858 - 865**, it is checked for XSS payloads.

<figure><img src="/files/bMOtifhRiwPYhcn0mopP" alt=""><figcaption><p>Vulnerable Code</p></figcaption></figure>

These checks only if **$\_GET\['query']** contains **"** and **script** string.

## Attack

Intercepting **query** request with burp:

<figure><img src="/files/eSFW0Zgn7HUpGIUmKx1q" alt=""><figcaption><p>Request</p></figcaption></figure>

"**TESTT**" is reflected in source code:

<figure><img src="/files/Qm9L1mO56mYr4Sx9Q8A3" alt=""><figcaption><p>Reflect on the page</p></figcaption></figure>

We have two vectors for attack:

1. Weak verification
2. Input reflect on the page

Go test the following payload:

```
"><svg+onload=alert(1)>
```

<figure><img src="/files/QkQ4vn6vlkBRpWvwAjMp" alt=""><figcaption><p>XSS Payload</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://vida03.gitbook.io/redteam/web/cve-2023-38964.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
