{"id":23248140,"url":"https://github.com/chihab357/nosql-injections","last_synced_at":"2026-04-07T09:31:25.547Z","repository":{"id":268274586,"uuid":"903838209","full_name":"Chihab357/NoSQL-Injections","owner":"Chihab357","description":"Demonstration of NoSQL Vulnerabilities","archived":false,"fork":false,"pushed_at":"2024-12-16T16:11:21.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"Demo-App-Branch","last_synced_at":"2025-07-24T16:14:33.322Z","etag":null,"topics":["ejs","html","javascript","mongodb","mongosh","nodejs","nosql","postman","sql"],"latest_commit_sha":null,"homepage":"","language":"EJS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chihab357.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-15T17:26:04.000Z","updated_at":"2024-12-16T16:11:25.000Z","dependencies_parsed_at":"2025-07-24T13:44:36.756Z","dependency_job_id":null,"html_url":"https://github.com/Chihab357/NoSQL-Injections","commit_stats":null,"previous_names":["chihab357/nosql-injections"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Chihab357/NoSQL-Injections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chihab357%2FNoSQL-Injections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chihab357%2FNoSQL-Injections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chihab357%2FNoSQL-Injections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chihab357%2FNoSQL-Injections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chihab357","download_url":"https://codeload.github.com/Chihab357/NoSQL-Injections/tar.gz/refs/heads/Demo-App-Branch","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chihab357%2FNoSQL-Injections/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28132954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-30T02:00:05.476Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ejs","html","javascript","mongodb","mongosh","nodejs","nosql","postman","sql"],"created_at":"2024-12-19T08:12:16.500Z","updated_at":"2025-12-30T22:00:06.304Z","avatar_url":"https://github.com/Chihab357.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ NoSQL Injection Demonstration 🚨  \n**_Educational Purpose Only_**\n\n---\n\n\u003cimg src=\"https://media1.tenor.com/m/5ry-200hErMAAAAd/hacker-hacker-man.gif\" width=\"300\" alt=\"Hacker GIF\"\u003e\n\n## 📋 Project Overview\n\nThis project demonstrates the **vulnerability of NoSQL databases**, focusing on **MongoDB** when used with a **Node.js application**. It highlights how attackers can bypass authentication using improperly validated inputs.\n\n### 💡 Key Learning Points:\n- Exploit **NoSQL Injection** using special MongoDB operators like `$gt` and `$or`.\n- Demonstrate how **unsecured queries** can alter logic.\n- Showcase **mitigation strategies** to secure your app.\n\n---\n\n## 🚀 Tech Stack  \n- **Backend:** Node.js  \n- **Database:** MongoDB  \n- **Testing Tool:** Postman  \n\n---\n\n## ⚙️ How It Works\n\n1. **Setup**: Create a database `demo` with a `users` collection containing `username` and `password` fields.\n2. **Attack**: Use Postman to send specially crafted JSON payloads with MongoDB operators like:  \n   ```json\n   { \"username\": { \"$gt\": \"\" }, \"password\": { \"$gt\": \"\" } }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihab357%2Fnosql-injections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchihab357%2Fnosql-injections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihab357%2Fnosql-injections/lists"}