CVE-2023-27250

9.8 CRITICAL

📋 TL;DR

Online Book Store Project v1.0 contains a SQL injection vulnerability in the /bookstore/bookPerPub.php endpoint that allows attackers to execute arbitrary SQL commands. This affects all deployments of this specific version of the software. Attackers can potentially access, modify, or delete database content.

💻 Affected Systems

Products:
  • Online Book Store Project
Versions: v1.0
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments of version 1.0. The vulnerability is in the source code itself.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, authentication bypass, and potential remote code execution if database permissions allow.

🟠

Likely Case

Unauthorized data access and extraction of sensitive information from the database, potentially including user credentials and personal data.

🟢

If Mitigated

Limited impact with proper input validation and database permission restrictions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept available on GitHub. SQL injection vulnerabilities are commonly weaponized with automated tools.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Consider upgrading to a newer version if available, or implement parameterized queries and input validation in the source code.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests.

Input Validation

all

Implement strict input validation and sanitization for the bookPerPub.php parameter.

🧯 If You Can't Patch

  • Implement parameterized queries or prepared statements in the PHP code
  • Restrict database user permissions to minimum required access

🔍 How to Verify

Check if Vulnerable:

Test the /bookstore/bookPerPub.php endpoint with SQL injection payloads like ' OR '1'='1

Check Version:

Check the project version in documentation or configuration files

Verify Fix Applied:

Verify that SQL injection payloads no longer work and that parameterized queries are implemented

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests with SQL keywords to bookPerPub.php

Network Indicators:

  • HTTP requests containing SQL injection patterns to the vulnerable endpoint

SIEM Query:

source="web_server_logs" AND (uri="/bookstore/bookPerPub.php" AND (query CONTAINS "UNION" OR query CONTAINS "SELECT" OR query CONTAINS "OR '1'='1"))

🔗 References

📤 Share & Export