Executive Summary
CVE-2025-67404 is a critical SQL injection vulnerability (CVSS 9.8) affecting Sourcecodester CASAP Automated Enrollment System version 1.0. The flaw exists in the student registration endpoint save_stud.php, where the parameters fname, lname, and student_class are directly interpolated into SQL queries without sanitization. An unauthenticated remote attacker can exploit any of these three parameters to read, modify, or destroy the underlying database — and potentially achieve OS-level code execution if the database user holds elevated privileges.
| Attribute | Value |
|---|---|
| CVE ID | CVE-2025-67404 |
| CVSS v3.1 Score | 9.8 (Critical) |
| Vulnerability Type | SQL Injection (CWE-89) |
| Attack Vector | Network |
| Authentication Required | None |
| Privileges Required | None |
| User Interaction | None |
| Confidentiality Impact | High |
| Integrity Impact | High |
| Availability Impact | High |
| Published | 2026-07-29 |
Affected Software
| Product | Version | Status |
|---|---|---|
| Sourcecodester CASAP Automated Enrollment System | 1.0 | Vulnerable |
CASAP (Computerized Automated Student Academic Performance) is an open-source PHP enrollment management system commonly used by schools in Southeast Asia. It is distributed freely through Sourcecodester.com.
Vulnerability Details
Root Cause
The student registration endpoint save_stud.php accepts student demographic data through HTTP POST and constructs SQL INSERT statements using direct string concatenation. Three parameters — fname (first name), lname (last name), and student_class — are not sanitized before being incorporated into the query, each providing an independent injection vector.
Vulnerable parameters: fname, lname, student_class
Affected endpoint: save_stud.php
Injection type: POST-based SQL Injection (three vectors)
Database: MySQLMultiple Injection Vectors
Unlike CVE-2025-67403 which exposes a single parameter, CVE-2025-67404 provides three independent injection points within a single endpoint. This increases the likelihood of exploitation success, as an attacker can choose whichever parameter is least filtered by any intermediate layer (e.g., WAF character limits).
| Parameter | Field Purpose | Injectable |
|---|---|---|
fname | Student first name | Yes |
lname | Student last name | Yes |
student_class | Class assignment | Yes |
Attack Scenario
1. Attacker locates internet-exposed CASAP instance
2. Sends HTTP POST to save_stud.php with SQL payload in fname, lname, or student_class
3. Injected SQL executes with the web application's database privileges
4. Attacker extracts full student database: names, addresses, academic records
5. May pivot to credential theft, record modification, or RCE via FILE privilege abuseWhy Student Registration is a High-Risk Endpoint
The student registration form is typically the most publicly accessible endpoint in an enrollment system — it is designed to be reachable by prospective students without authentication. This means:
- No authentication barrier to reach the vulnerable code path
- High volume of legitimate traffic makes anomaly detection harder
- The form's open nature is likely to be internet-facing during enrollment periods
CVSS Vector Breakdown
| Metric | Value | Rationale |
|---|---|---|
| Attack Vector | Network | Remotely exploitable via HTTP POST |
| Attack Complexity | Low | Three injectable parameters, no special conditions |
| Privileges Required | None | Student registration requires no login |
| User Interaction | None | Fully automated exploitation possible |
| Scope | Unchanged | Database-layer impact |
| Confidentiality | High | Full student record disclosure |
| Integrity | High | Academic records can be modified |
| Availability | High | Database can be dropped |
CVSS v3.1 Base Score: 9.8 (Critical)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Data Exposure Risk
CASAP enrollment systems hold personally identifiable information (PII) for enrolled students. A successful exploitation could expose:
| Data Category | Examples |
|---|---|
| Personal identifiers | Full legal names, dates of birth |
| Contact information | Home addresses, phone numbers, guardians |
| Academic records | Grades, enrollment status, class assignments |
| Administrator credentials | Hashed (or plaintext) passwords for staff accounts |
| Financial data | Tuition payment records (if stored) |
Schools operating under FERPA (US), PIPEDA (Canada), PDPA (Philippines), or similar student data protection frameworks may face regulatory consequences from a breach.
Remediation
Immediate Mitigation
- Restrict network access — Remove CASAP from public internet; require VPN for access
- Deploy a WAF — Apply SQL injection filtering rules as an interim control
- Monitor database logs — Review for anomalous SELECT, UNION, or DROP statements
- Audit existing records — Check for signs of data tampering or unauthorized student entries
- Change credentials — Rotate all database passwords and application admin accounts
Developer Fix
Replace string-concatenated queries in save_stud.php with parameterized statements:
// VULNERABLE pattern (do not use):
$sql = "INSERT INTO students (fname, lname, student_class)
VALUES ('" . $_POST['fname'] . "',
'" . $_POST['lname'] . "',
'" . $_POST['student_class'] . "')";
// SECURE — PDO prepared statement:
$stmt = $pdo->prepare(
"INSERT INTO students (fname, lname, student_class) VALUES (:fname, :lname, :student_class)"
);
$stmt->execute([
':fname' => $_POST['fname'],
':lname' => $_POST['lname'],
':student_class' => $_POST['student_class'],
]);Additionally, implement input validation (length limits, character allowlists for names) as a defense-in-depth measure.
Relation to CVE-2025-67403
CVE-2025-67404 was disclosed alongside CVE-2025-67403 (SQL injection in update_class.php), indicating that the CASAP codebase has systemic SQL injection issues across multiple endpoints. Organizations running CASAP 1.0 should assume the vulnerability is not limited to these two files and conduct a full code audit of all SQL-constructing endpoints.
| CVE | Endpoint | Vulnerable Parameter(s) | CVSS |
|---|---|---|---|
| CVE-2025-67403 | update_class.php | class_name | 9.8 |
| CVE-2025-67404 | save_stud.php | fname, lname, student_class | 9.8 |
Detection
| Indicator | Description |
|---|---|
| SQL metacharacters in POST parameters | Single quotes, UNION SELECT, -- in name fields |
| Unexpected database entries | Students with names containing SQL keywords |
Spike in POST requests to save_stud.php | Automated exploitation tooling |
| Database error strings in HTTP responses | Active probing for injection points |
Key Takeaways
- CVSS 9.8 Critical — Three injectable parameters in the public-facing student registration form
- No authentication required — Reachable by anyone, including automated scanners
- Systemic issue — Disclosed alongside CVE-2025-67403; assume CASAP has additional vulnerable endpoints
- PII at risk — Student records, academic data, and administrative credentials all exposed
- Immediate isolation required — Remove from internet exposure until code is patched