🇰🇷 한글 설명
Simple PHP Shopping Cart 0.9 버전에서 category.php 파일의 category_id 매개변수에 대한 부적절한 입력 검증으로 인한 SQL injection 취약점입니다. 공격자가 조작된 SQL 쿼리를 전송하여 데이터베이스에 저장된 모든 정보를 유출할 수 있습니다.
💡 쉬운 설명
쇼핑 카트 웹사이트의 상품 분류 기능에서 사용자 입력을 제대로 검증하지 않아 해커가 몰래 데이터베이스에 접근할 수 있는 결함입니다. 이를 통해 고객 정보, 주문 내역, 결제 정보 등 모든 민감한 데이터가 도용될 위험이 있습니다.
🇺🇸 원문 (English)
SQL injection vulnerability in Simple PHP Shopping Cart affecting version 0.9. This vulnerability could allow an attacker to retrieve all the information stored in the database by sending a specially crafted SQL query, due to the lack of proper sanitisation of the category_id parameter in the category.php file.
📍 영향받는 시스템
Simple PHP Shopping Cart 버전 0.9 및 이전 버전
⚔️ 공격 벡터
category.php의 category_id 파라미터에 SQL 구문을 삽입하여 직접 데이터베이스 쿼리 조작
🛡️ 대응 방법
버전 0.10 이상으로 업그레이드하거나 모든 입력값에 대해 prepared statement와 parameterized query 적용
🔧 검증 코드
Simple PHP Shopping Cart 설치 경로에서 category.php 파일을 찾아 category_id 매개변수의 입력 검증 코드 존재 여부를 확인합니다. SELECT 문에서 직접 변수 사용이 발견되면 취약점이 있는 상태입니다.
find / -name 'category.php' 2>/dev/null -exec grep -l 'category_id' {} \; | head -1 | xargs grep -E 'SELECT.*category_id|\$_GET\[.category_id.\]' 2>/dev/null