CVE-2022-1080

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in One Church Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the search2 parameter in attendancy.php. This affects all deployments of the vulnerable software version, potentially compromising the entire database.

💻 Affected Systems

Products:
  • SourceCodester One Church Management System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable. The vulnerability exists in the default codebase.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, authentication bypass, and potential remote code execution if database functions allow it.

🟠

Likely Case

Unauthorized data access and extraction of sensitive church member information, financial records, and administrative credentials.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable without authentication, making internet-facing instances immediate targets.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but require network access, reducing exposure to external attackers.

🎯 Exploit Status

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

SQL injection via GET/POST parameters is well-understood with many automated tools available. The vulnerability requires no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Check vendor website for updated version. 2. If no patch exists, implement workarounds immediately. 3. Consider migrating to alternative software if vendor is unresponsive.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation to sanitize the search2 parameter before processing

Modify attendancy.php to use prepared statements with parameterized queries

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Add WAF rule: deny requests containing SQL keywords in search2 parameter

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement network segmentation to limit database access from the web server

🔍 How to Verify

Check if Vulnerable:

Test the search2 parameter in attendancy.php with SQL injection payloads like ' OR '1'='1

Check Version:

Check the software version in admin panel or configuration files

Verify Fix Applied:

Test with the same payloads and verify they are properly sanitized or rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts after SQL injection
  • Requests to attendancy.php with SQL keywords in parameters

Network Indicators:

  • Unusual database traffic patterns from web server
  • SQL error messages in HTTP responses

SIEM Query:

source="web_logs" AND uri="*attendancy.php*" AND (param="*search2=*OR*" OR param="*search2=*UNION*" OR param="*search2=*SELECT*")

🔗 References

📤 Share & Export