# Client Side Request Forgery (CSRF)

## What is CSRF?

CSRF (Cross-Site Request Forgery) is an attack that tricks a user into performing unwanted actions on a web application where they’re already authenticated.

*How it works?*

1. You’re logged into a site (e.g., your bank).
2. A malicious website tricks your browser into making a request to that site (e.g., transfer money).
3. Since you’re already logged in, the browser includes your session cookie automatically.
4. The request is processed as if it came from you—without your knowledge.

## Video Explanation

{% embed url="<https://youtu.be/eWEgUcHPle0?si=LJUYhOZWWxZZ1xzN>" %}


---

# 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://bernas.gitbook.io/oswe-everything/vulnerabilities/client-side-request-forgery-csrf.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.
