-
Notifications
You must be signed in to change notification settings - Fork 4.3k
File upload lfi cheatsheet #1883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File upload lfi cheatsheet #1883
Conversation
|
Thank you for considering this contribution! This cheat sheet combines guidance on secure file upload handling and Local File Inclusion prevention, which are often interconnected security concerns. I created this comprehensive guide to help developers implement secure file handling practices while being aware of related LFI vulnerabilities. Key highlights of this cheat sheet:
I'm open to any feedback or suggestions to improve the content and make it more valuable for the community. |
jmanico
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot! It's awesome! Give us time to review this.
|
Thank you so much for taking the time to review this! 🙏 |
mackowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NotaScripptkiddie please review more carefully LLM generated content. Before we start review please:
- remove /pr_body
- remove ````markdown
- review and fill "Checklist for contributor" including "Markdown Link Check" and your LLM prompts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new comprehensive cheat sheet covering File Upload vulnerabilities and Local File Inclusion (LFI) attacks to the OWASP Cheat Sheet Series. The guide provides both defensive guidance for developers and testing methodologies for security professionals.
Key Changes:
- Introduces detailed coverage of file upload bypass techniques including extension manipulation, MIME type spoofing, magic byte manipulation, and polyglot file creation
- Provides secure PHP implementation examples for file upload handling and file serving with multiple validation layers
- Documents attack vectors and defensive measures aligned with OWASP Top 10 2021 categories
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
cheatsheets/File_Upload_and_Local_File_Inclusion_Cheat_Sheet.md |
New comprehensive cheat sheet covering file upload security, bypass techniques, secure implementation patterns, and defensive coding practices |
.pr_body.md |
PR description template with contributor checklist and metadata for submission |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @andrzejsydor, Thank you for reviewing my PR! I'm a beginner in pentesting and I created this cheatsheet to help me with my own testing work. I thought it would be useful to share it with the OWASP community so others can benefit from it too. I see that my PR is currently blocked with "2 requested changes" but I'm not entirely sure what needs to be fixed. Could you please help me understand:
I want to make sure I address all your feedback correctly. I'm eager to learn and contribute properly to this project. Thank you for your patience and guidance! |
|
Hey @NotaScripptkiddie, |
|
Hi @szh and @mackowski, Thank you for the feedback! AI Tool Usage Disclosure✅ Yes, I used Claude AI to help structure and format the content to match OWASP standards. The technical research is mine, but AI assisted with organization and formatting. Regarding Duplicate ContentYou're absolutely right - I should have checked the existing File Upload cheat sheet first. My apologies for the oversight. After reviewing the existing cheat sheet, I see this PR has significant overlap. However, there are some unique areas: Unique Coverage:
Proposed SolutionWould it make more sense to:
Full TransparencyI'm aspiring to be a GSoC OWASP 2026 student contributor. This PR was my attempt to contribute meaningful content while learning the contribution process. I understand I should have researched existing content first, and I'm committed to making valuable contributions rather than just adding noise. What direction would you recommend? Thanks for your guidance! |
|
@NotaScripptkiddie most bigger open source projects have "contributor guideline" or "contributing rules". Here is ours https://github.com/OWASP/CheatSheetSeries/blob/master/CONTRIBUTING.md. I suggest to always review that and later fllow it. |
You're A Rockstar
Thank you for submitting a Pull Request (PR) to the Cheat Sheet Series.
Please make sure that for your contribution:
[TEXT](URL)If your PR is related to an issue, please finish your PR text with the following line:
This PR fixes issue #
1883.AI Tool Usage Disclosure (required for all PRs)
Please select one of the following options:
the contents and I affirm the results. The LLM used is
[Claude Sonnet4.5]and the prompt used is
[your prompt here]. [Feel free to add more details if needed]Thank you again for your contribution 😃