CVE-2024-9818

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in SourceCodester Online Veterinary Appointment System 1.0 allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in /admin/categories/manage_category.php. This can lead to unauthorized data access, modification, or deletion. Organizations using this veterinary appointment system are affected.

💻 Affected Systems

Products:
  • SourceCodester Online Veterinary Appointment System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation. Any system with the vulnerable file accessible is affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including theft of sensitive client/patient data, administrative credential theft, and potential system takeover via SQL injection leading to remote code execution.

🟠

Likely Case

Unauthorized access to appointment data, client information, and potential modification/deletion of veterinary records.

🟢

If Mitigated

Limited impact if proper input validation and parameterized queries are implemented, with database permissions restricted to minimum necessary privileges.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit requires access to the admin interface. The vulnerability is in an admin function, so attacker needs admin credentials or another path to reach the vulnerable endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

1. Check vendor website for updates
2. If patch available, download and apply
3. Replace vulnerable manage_category.php file
4. Test functionality after patching

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to sanitize the 'id' parameter before processing

Modify /admin/categories/manage_category.php to validate 'id' parameter as integer

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

🧯 If You Can't Patch

  • Restrict access to /admin/ directory to trusted IP addresses only
  • Implement database user with minimal privileges (read-only if possible) for the application

🔍 How to Verify

Check if Vulnerable:

Test the /admin/categories/manage_category.php endpoint with SQL injection payloads in the 'id' parameter

Check Version:

Check system version in admin panel or readme files

Verify Fix Applied:

Attempt SQL injection after applying fixes and verify no database errors or unexpected behavior occurs

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin panel
  • Requests to manage_category.php with suspicious 'id' parameters

Network Indicators:

  • HTTP requests containing SQL keywords (UNION, SELECT, etc.) in URL parameters
  • Unusual traffic patterns to admin endpoints

SIEM Query:

source="web_logs" AND (url="*manage_category.php*" AND (param="*id=*UNION*" OR param="*id=*SELECT*" OR param="*id=*' OR '*"))

🔗 References

📤 Share & Export