提出 #970933: SourceCodester Drug Recommendation System 1.0 SQL Injection情報

タイトルSourceCodester Drug Recommendation System 1.0 SQL Injection
説明A SQL injection vulnerability exists in SourceCodester Drug Recommendation System 1.0 in Admin/add_drug.php. The POST parameters txtname, cmdtype, txtusage, txtsideeffect, and cmdcontraindication are processed with mysqli_real_escape_string() but still concatenated directly into SELECT and INSERT queries without parameterized binding. The escape function can be bypassed under non-standard MySQL character sets and does not provide the same protection as prepared statements. Vulnerable queries: SELECT * FROM drugs WHERE name = '$name' AND type = '$type' INSERT INTO drugs (name, type, drug_usage, side_effects, contraindications) VALUES ('$name', '$type', '$usage', '$sideeffect', '$contraindication') Proof of Concept (authenticated): POST /Admin/add_drug.php Content-Type: application/x-www-form-urlencoded Cookie: PHPSESSID=<valid> btnadd=1&txtname=test' OR 1=1-- -&cmdtype=Tablet&txtusage=test&txtsideeffect=test&cmdcontraindication=Pregnancy Impact: An authenticated attacker can inject SQL through drug creation fields, extracting or modifying database contents. CWE-89, CVSS v3.1 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
ソース⚠️ https://www.sourcecodester.com/php/18278/drug-recommender-web-app-student-project.html
ユーザー
 swj99557271 (UID 101148)
送信2026年09月10日 05:49 (25 日 ago)
モデレーション2026年10月04日 10:50 (24 days later)
ステータス承諾済み
VulDBエントリ413409 [SourceCodester Drug Recommendation System 1.0 Drug Creation /Admin/add_drug.php SQLインジェクション]
ポイント20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!