Vulnerabilities | Programming languages | Run a vulnerable code snippet | Installation | Update
YesWeHack present code snippets containing several different vulnerabilities to practice your code analysis in a safe dockerized envoriment. The vulnerable code snippets are suitable for all skill levels.
~ New vulnerable code snippet at Twitter @yeswehack every Friday! 🗒
If you want to see something special or if you just have an idea about a vulnerable code snippet, feel free to create a "New Issue" where you explain your idea, no idea is stupid.
Be sure to run this in a secure environment, as the code is vulnerable and is intended to be used for learning code analysis! By default, all vulnerable code snippets contain a docker setup that isolates the code from your host system and make it safe to run (read more in the section : "Run a vulnerable code snippet").
A Collection of all vulnerable code snippets posted on our Twitter 📂
- Broken access control - CWE-284
- Code injection - CWE-94
- Cross Site Request Forgery (CSRF) - CWE-352
- SQL injection (SQLi) - CWE-89
- Cross Site Scripting (XSS) - CWE-79
- Open Redirect - CWE-601
- Server-side template injection (SSTI) - CWE-1336
- Server Side Request Forgery (SSRF) - CWE-918
- Cross Origin Resource Sharing (CORS) - CWE-942
- Clickjacking - CWE-1021
- Unrestricted File Upload - CWE-434
- Path Traversal - CWE-35
- Denial Of Service - CWE-400
- Weak Password Recovery Mechanism for Forgotten Password - CWE-640
- Insecure Direct Object Reference (IDOR) - CWE-639
- Deserialization Of Untrusted Data - CWE-502
- Local File Inclusion - CWE-98
- Buffer Overflow - CWE-120
- Acceptance of Extraneous Untrusted Data With Trusted Data ("Cache Poisoning") - CWE-349
- Business Logic Errors - CWE-840
- Format injection - CWE-134
- Command injection - CWE-77
Also included
- SQL (MySQL)
- HTML
- CSS
In each vulnerable code snippet (Vsnippet) folder there is a docker-compose.yml file. To start a Vsnippet in an isolated docker environment simply run the following command:
docker compose up --build
or
docker-compose up --build
git clone https://github.com/yeswehack/vulnerable-code-snippets.gitTo get the latest vulnerable code snippets, run:
git pull~ H4v3 y0u f0und th3 E4st3r 3gg y3t? 🐇🪺
For questions, help or if you have discovered a problem with the code. Contact us on Twitter: @yeswehack 📬

