CVE-2025-22926
Executive Summary
CVE-2025-22926 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=messaging/Inbox.php&modfunc=save&filename endpoint. This allows the attacker to read arbitrary files from the server's filesystem, potentially exposing sensitive configuration files, database credentials, and other confidential data. The vulnerability is currently unpatched, and a proof-of-concept (PoC) is publicly available, increasing the risk of active exploitation. The CVSS score is 0.0 due to incomplete NVD data, but based on the nature of the vulnerability, a score of 7.5 (High) is estimated.
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
This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct issue within the openSIS web application source code. The risk is primarily to organizations that have deployed openSIS as a student information system.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required for exploitation.
- Privileges Required (PR): None (N) - No authentication is needed.
- User Interaction (UI): None (N) - The victim does not need to perform any action.
- Scope (S): Unchanged (U) - The exploit does not affect other components.
- Confidentiality (C): High (H) - Sensitive files can be read.
- Integrity (I): None (N) - File modification is not possible.
- Availability (A): None (N) - No impact on system availability.
Estimated CVSS Score: 7.5 (High)
Threat Level: High. The combination of network exploitability, no authentication, and public PoC makes this a high-priority threat.
Deep Dive & Mechanics
The vulnerability resides in the file handling logic of the messaging module. The Modules.php script accepts a filename parameter via a POST request. This parameter is not properly sanitized, allowing an attacker to inject path traversal sequences (e.g., ../) to navigate outside the intended directory.
The vulnerable code path is:
/Modules.php?modname=messaging/Inbox.php&modfunc=save&filename
When a POST request is sent to this endpoint with a filename parameter containing traversal sequences, the application reads the file from the filesystem and returns its contents in the response. The lack of input validation and the absence of a whitelist for allowed file paths are the root causes.
Example Attack Vector:
POST /Modules.php?modname=messaging/Inbox.php&modfunc=save&filename=../../../../etc/passwd
This would attempt to read the /etc/passwd file.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code is assumed to be present in the file handling logic. A patched version would include proper input validation.
Vulnerable Code (Conceptual):
$filename = $_POST['filename'];
$filepath = '/var/www/openSIS/attachments/' . $filename;
$content = file_get_contents($filepath);
echo $content;
Patched Code (Conceptual):
$filename = basename($_POST['filename']); // Remove path components
$allowed_dir = '/var/www/openSIS/attachments/';
$filepath = $allowed_dir . $filename;
if (strpos(realpath($filepath), realpath($allowed_dir)) === 0) {
$content = file_get_contents($filepath);
echo $content;
} else {
// Deny access
http_response_code(403);
echo "Access denied.";
}
Exploitation & Lab Setup
Red Team (Exploitation)
Setup: Deploy a vulnerable openSIS instance (version 8.0 to 9.1) in a lab environment.
Reconnaissance: Identify the target endpoint:
/Modules.php?modname=messaging/Inbox.php&modfunc=save&filename.Craft Payload: Use
curlor a similar tool to send a POST request with a traversal payload.curl -X POST "http://target/Modules.php?modname=messaging/Inbox.php&modfunc=save&filename=../../../../etc/passwd"Exploit: Execute the request. If successful, the contents of
/etc/passwdwill be returned.Data Exfiltration: Extract sensitive files such as configuration files (e.g.,
config.php,.env), database dumps, or SSH keys.curl -X POST "http://target/Modules.php?modname=messaging/Inbox.php&modfunc=save&filename=../../../../var/www/openSIS/config.php"
Blue Team (Defense & Detection)
- Monitor Logs: Look for POST requests to
/Modules.phpwith parametersmodname=messaging/Inbox.php&modfunc=save&filenamecontaining../or..\\sequences. - Web Application Firewall (WAF): Deploy rules to block requests with path traversal patterns in the
filenameparameter. - File Integrity Monitoring (FIM): Monitor for unauthorized reads of sensitive files (e.g.,
/etc/passwd, configuration files). - Network Segmentation: Isolate the openSIS server to limit the impact of a successful exploit.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/Modules.php?modname=messaging/Inbox.php&modfunc=save&filenamewith../or..\\sequences. - Outbound data transfers containing sensitive file contents (e.g.,
root:x:0:0:root).
- POST requests to
- Host:
- Unusual file read events in audit logs (e.g.,
auditd). - Presence of temporary files created by exploitation scripts.
- Unusual file read events in audit logs (e.g.,
- Logs:
- Web server access logs showing repeated traversal attempts.
- Application error logs indicating failed file reads.
Detection Engineering
YARA Rule
rule CVE_2025_22926_Directory_Traversal {
meta:
description = "Detects directory traversal attempts targeting CVE-2025-22926 in openSIS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-22926"
strings:
$traversal1 = "..\\" ascii wide
$traversal2 = "../" ascii wide
$traversal3 = "%2e%2e%2f" ascii wide
$traversal4 = "%2e%2e\\" ascii wide
$endpoint = "Modules.php" ascii wide
$param = "modname=messaging/Inbox.php" ascii wide
$func = "modfunc=save" ascii wide
condition:
all of ($endpoint, $param, $func) and any of ($traversal*)
}
Sigma Rule
title: CVE-2025-22926 Directory Traversal Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP POST requests with directory traversal patterns targeting the openSIS messaging module.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- 'Modules.php'
- 'modname=messaging/Inbox.php'
- 'modfunc=save'
cs-uri-query|contains|all:
- 'filename'
- '..'
condition: selection
falsepositives:
- Legitimate file names containing '..' (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-22926 Directory Traversal Attempt"; flow:to_server; content:"POST"; http_method; content:"Modules.php"; http_uri; content:"modname=messaging/Inbox.php"; http_uri; content:"modfunc=save"; http_uri; content:"filename"; http_uri; pcre:"/filename=[^&]*\.\.\//i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: If possible, disable the messaging module or restrict access to the vulnerable endpoint via a WAF or web server configuration.
- Code Fix: Implement proper input validation and sanitization for the
filenameparameter. Usebasename()to strip path components and verify that the resolved path is within an allowed directory. - Upgrade: Monitor the OS4ED/openSIS project for an official patch. Upgrade to a patched version as soon as it becomes available.
- Workaround: If patching is not possible, implement a virtual patch using a WAF to block requests containing path traversal sequences.
- Monitoring: Enable detailed logging and alerting for the vulnerable endpoint. Review logs regularly for signs of exploitation.
Valters IT
Securing Digital Frontiers