🇰🇷 한글 설명
WordPress의 Woocommerce Custom Product Addons Pro 플러그인 5.4.1 버전 이하에서 process_custom_formula() 함수의 eval() 사용 시 사용자 입력에 대한 부족한 검증으로 인해 원격 코드 실행이 가능합니다. 공격자는 사용자 정의 가격 책정 수식이 설정된 텍스트 필드에 악의적인 값을 제출하여 서버에서 임의의 PHP 코드를 실행할 수 있습니다.
💡 쉬운 설명
이 플러그인은 사용자가 입력한 가격 계산식을 PHP eval()로 직접 실행하므로, 공격자가 악성 코드를 숨겨서 보낼 수 있습니다. 플러그인이 로그인 없이도 입력을 받아들이기 때문에 누구나 이 공격을 시도할 수 있습니다.
🇺🇸 원문 (English)
The Woocommerce Custom Product Addons Pro plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 5.4.1 via the custom pricing formula eval() in the process_custom_formula() function within includes/process/price.php. This is due to insufficient sanitization and validation of user-submitted field values before passing them to PHP's eval() function. The sanitize_values() method strips HTML tags but does not escape single quotes or prevent PHP code injection. This makes it possible for unauthenticated attackers to execute arbitrary code on the server by submitting a crafted value to a WCPA text field configured with custom pricing formula (pricingType: "custom" with {this.value}).
📍 영향받는 시스템
Woocommerce Custom Product Addons Pro 플러그인 버전 5.4.1 이하 (WordPress)
⚔️ 공격 벡터
인증 없이 사용자 정의 가격 책정 수식이 설정된 상품의 WCPA 텍스트 필드에 PHP 코드 주입
🛡️ 대응 방법
플러그인을 최신 버전으로 업데이트하거나, 사용자 정의 가격 책정 수식 기능 비활성화
🔧 검증 코드
명령어 결과로 나타난 버전 번호가 5.4.1 이하이면 취약합니다. 최신 버전(5.4.2 이상)이 출력되면 패치되었습니다.
curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce-custom-product-addons-pro.json 2>/dev/null | grep -oP '"version":\s*"\K[^"]+' | head -1