# LFI / RFI (Local / Remote File Inclusion)

LFI / RFI are the most common vulnerabilities in unsecure web applications. Essentially a website (usually PHP, but doesn't have to be) will allow user input without any sort of (or poor) input sanitization. This mean that a rogue user can use the vulnerability to read local or remote files that can provide information and/or even provide a way to do remote code execution (RCE).&#x20;

Basic examples:

1. index.php?page=/etc/passwd
2. index.php?page=../../../home/falcon/.ssh/id\_rsa
3.


---

# 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://www.davila.me/menu/vulnerability-methods/lfi-rfi-local-remote-file-inclusion.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.
