CVE-2021-43155

9.8 CRITICAL

📋 TL;DR

CVE-2021-43155 is a critical SQL injection vulnerability in Projectsworlds Online Book Store PHP v1.0 that allows attackers to execute arbitrary SQL commands via the 'bookisbn' parameter in cart.php. This affects all users running the vulnerable version of this PHP-based online bookstore software, potentially exposing database contents including user credentials and sensitive information.

💻 Affected Systems

Products:
  • Projectsworlds Online Book Store PHP
Versions: v1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the default installation of v1.0; requires PHP environment with database connectivity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise allowing data theft, modification, or deletion; potential authentication bypass; possible remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized access to sensitive data including user information, order details, and potentially administrative credentials stored in the database.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - The vulnerability is in a web application component accessible from the internet.
🏢 Internal Only: MEDIUM - Lower risk if application is only accessible internally, but still vulnerable to insider threats.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

SQL injection via GET/POST parameter requires minimal technical skill; exploit details are publicly available in GitHub issues.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not specified

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

1. Review the GitHub issue for community fixes. 2. Implement parameterized queries in cart.php. 3. Add input validation for the bookisbn parameter. 4. Test thoroughly before deployment.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to only accept numeric ISBN values

In cart.php, add: if(!is_numeric($_GET['bookisbn'])) { die('Invalid ISBN'); }

WAF Rule Implementation

linux

Deploy web application firewall rules to block SQL injection patterns

ModSecurity rule: SecRule ARGS:bookisbn "@detectSQLi" "id:1001,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Isolate the application behind a reverse proxy with strict input filtering
  • Implement network segmentation to limit database access from the application server

🔍 How to Verify

Check if Vulnerable:

Test by accessing cart.php?bookisbn=1' OR '1'='1 and observing if SQL errors appear or unexpected behavior occurs.

Check Version:

Check PHP files for version comments or review project documentation; typically no built-in version command.

Verify Fix Applied:

Attempt the same SQL injection test after fixes; should receive proper error handling or validation messages instead of SQL errors.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests with SQL-like patterns in bookisbn parameter
  • Unexpected database query patterns

Network Indicators:

  • HTTP requests containing SQL keywords in bookisbn parameter
  • Abnormal traffic patterns to cart.php

SIEM Query:

source="web_logs" AND uri="*cart.php*" AND (param="*bookisbn=*'*" OR param="*bookisbn=*%27*")

🔗 References

📤 Share & Export