-
-
Notifications
You must be signed in to change notification settings - Fork 193
Description
Summary
Security audit found 10 vulnerabilities (4 CRITICAL, 5 HIGH, 1 MEDIUM). The application has fundamental security design issues.
CRITICAL Findings
-
Certificates controller fully unauthenticated (CWE-306) —
controllers/certificates.phpmissing auth check in constructor. All certificate endpoints (generate SLC, view dashboard, delete) accessible without login. -
Base controller auth check commented out (CWE-306) —
core/MY_Controller.phplines 13-16 have the auth check commented out. Authentication is opt-in per controller instead of default-enforce. -
Plaintext password storage (CWE-256) —
models/login_model.phpcompares passwords in plaintext via SQL WHERE clause. SQL dump shows actual passwords:nicola11,1234,user. -
SQL injection via column names (CWE-89) —
controllers/admissions.phplines 392-438,models/student_model.phplines 14-45. User-controlledsearch_col_1/sort_col_1POST params passed as column names to->where()and->order_by(). CodeIgniter escapes values but NOT column names.
HIGH Findings
- Hardcoded owner credentials (CWE-798) —
controllers/owner.phplines 28-38:akshat41121995@gmail.com/nicola11 - CSRF protection disabled (CWE-352) —
config/config.phpline 452:csrf_protection = FALSE - Weak encryption key (CWE-321) —
config/config.phpline 328:encryption_key = '123456' - Mass assignment (CWE-915) —
core/MY_Controller.phplines 40-58: raw POST data inserted into DB after only removing 'submit' key - No RBAC (CWE-269) — Single 'admin' role for all users, no separation of duties
MEDIUM
- Insecure session config (CWE-384) — NULL save path + no IP matching
Recommended Fixes
- Uncomment auth check in
MY_Controller(centralized enforcement) - Use
password_hash()/password_verify()for password storage - Whitelist allowed column names for search/sort operations
- Remove hardcoded credentials
- Enable CSRF protection
- Generate a proper encryption key
- Use explicit field lists instead of raw POST data
- Implement role-based access control