{"id":19851878,"url":"https://github.com/stackoverflowexcept1on/cve-2021-36393","last_synced_at":"2025-09-18T13:32:08.879Z","repository":{"id":211569203,"uuid":"710897618","full_name":"StackOverflowExcept1on/CVE-2021-36393","owner":"StackOverflowExcept1on","description":"Error-based blind SQL injection with bit-shifting approach for Moodle 3.10.4","archived":false,"fork":false,"pushed_at":"2023-12-29T14:12:50.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T19:14:31.847Z","etag":null,"topics":["blind-sql-injection","cve","moodle","sql-injection","vulnerability"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/StackOverflowExcept1on.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}},"created_at":"2023-10-27T17:13:55.000Z","updated_at":"2025-02-02T16:43:40.000Z","dependencies_parsed_at":"2023-12-29T15:26:57.165Z","dependency_job_id":null,"html_url":"https://github.com/StackOverflowExcept1on/CVE-2021-36393","commit_stats":null,"previous_names":["stackoverflowexcept1on/cve-2021-36393"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StackOverflowExcept1on/CVE-2021-36393","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2FCVE-2021-36393","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2FCVE-2021-36393/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2FCVE-2021-36393/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2FCVE-2021-36393/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackOverflowExcept1on","download_url":"https://codeload.github.com/StackOverflowExcept1on/CVE-2021-36393/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2FCVE-2021-36393/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275774187,"owners_count":25526172,"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-09-18T02:00:09.552Z","response_time":77,"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":["blind-sql-injection","cve","moodle","sql-injection","vulnerability"],"created_at":"2024-11-12T13:33:05.570Z","updated_at":"2025-09-18T13:32:08.564Z","avatar_url":"https://github.com/StackOverflowExcept1on.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### CVE-2021-36393\n\nError-based blind SQL injection with bit-shifting approach for Moodle 3.10.4.\n\nAllows an attacker to perform arbitrary database queries. For example, you can steal:\n\n- test answers from the database\n\n  Modify the [`script.js`](script.js) file and run it on route `/mod/quiz/attempt.php?attempt=...\u0026cmid=...`\n\n- user password hashes:\n  ```sql\n  (SELECT password FROM mdl_user WHERE id = 2 LIMIT 1)\n  ```\n\n- user sessions:\n  ```sql\n  (SELECT sid FROM mdl_sessions ORDER BY id DESC LIMIT 1)\n  ```\n\n### How to use it?\n\nYou must be logged in and enrolled in at least one course. The just copy the [`script.js`](script.js) code into your\nbrowser console and run it on a website that has the vulnerable version of Moodle installed.\n\n### How to check the installed version of Moodle?\n\n```bash\nDOMAIN=\"example.com\"\ncurl -s https://$DOMAIN/lib/upgrade.txt | head\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Fcve-2021-36393","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackoverflowexcept1on%2Fcve-2021-36393","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Fcve-2021-36393/lists"}