Jul 11, 2026·6 min read·15 visits
Authenticated users with SA_EMPLOYEE permissions in NotrinosERP versions up to and including 1.0.0 can upload arbitrary PHP scripts via the employee document upload interface, resulting in remote code execution.
An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.
The Human Resource Management (HRM) module of NotrinosERP contains a critical file upload interface within the employee profile documents section. This interface is accessible to authenticated users who possess the "Manage Employees" (SA_EMPLOYEE) privilege. The purpose of this module is to allow HR coordinators to attach administrative and identification documents to individual employee profiles.
The backend handling of these file uploads presents an unconstrained attack surface. It accepts files directly from the user's multipart HTTP POST request and writes them into a public directory within the application's web root. There is no access control mechanism or routing gateway protecting these files once they are written to disk.
The primary vulnerability is classified as CWE-434 (Unrestricted Upload of File with Dangerous Type). By exploiting this flaw, an attacker can upload executable scripts, such as web shells, and trigger their execution by requesting the file directly via HTTP. This leads to immediate and complete remote code execution under the privileges of the web server's operating system process.
The fundamental flaw resides within the script "hrm/manage/employees.php" inside the "tab_documents()" function. In NotrinosERP version 1.0.0, the handler responsible for processing the employee document form fails to execute any validation on the client-supplied filename or file content. It relies on the raw "$_FILES['doc_file']['name']" variable to determine the destination filename on the server.
Unlike other upload functions within NotrinosERP—such as the profile photo uploader, which enforces image format verifications, or the core attachment engine in "includes/ui/attachment.inc", which generates random, extensionless files on disk—this specific HRM handler bypasses all security layers. It builds the target filesystem path by concatenating the upload directory with the unsanitized, user-provided filename.
Furthermore, the destination directory "/company/0/documents/employees/" is fully web-accessible. The root ".htaccess" file only restricts files ending in specific administrative extensions such as ".inc", ".po", or ".sh". It does not contain rules to block the execution of PHP scripts inside the "/company" tree, allowing the web server to interpret and execute any PHP files written to this path.
The vulnerable code execution flow can be traced directly within the document upload handler. The following block highlights the exact mechanism where the unsanitized input is processed and written to the filesystem.
// hrm/manage/employees.php (Release 1.0.0, Lines 568-573)
$upload_dir = company_path().'/documents/employees';
if (!file_exists($upload_dir))
mkdir($upload_dir, 0777, true);
// Vulnerable path construction using unvalidated client filename
$file_path = $upload_dir.'/'.$employee_id.'_'.time().'_'.$_FILES['doc_file']['name'];
// File written to the web root without further inspection
if (!move_uploaded_file($_FILES['doc_file']['tmp_name'], $file_path)) {
// error handling
}The variable "$file_path" is constructed by directly appending the client-provided file name. Because there is no call to a sanitization function or an extension check, an attacker can control both the file extension and the path layout. On PHP environments that do not automatically strip path traversal sequences from file upload names, an attacker could inject "../" directory traversal characters, leading to a secondary CWE-22 vulnerability.
Additionally, a secondary stored Cross-Site Scripting (XSS) vulnerability (CWE-79) exists in the rendering code within "hrm/includes/ui/employee_ui.inc". The application stores the "$file_path" in the database and echoes it directly inside the "href" attribute of an anchor tag without applying any HTML entity encoding.
// hrm/includes/ui/employee_ui.inc (Lines 153-154)
// Vulnerable output rendering
echo "<a href='" . $file_path . "' target='_blank'>View</a>";An attacker must first authenticate and obtain a valid session cookie possessing the "SA_EMPLOYEE" permission. The attack requires a valid CSRF token, which can be acquired by querying the document tab. A "GET" request is sent to the employee page to extract the "_token" parameter from the HTML form.
With the CSRF token in hand, the attacker constructs a multipart form-data "POST" request to upload the payload. The payload is a standard PHP web shell embedded within the "doc_file" parameter, with the filename set to "shell.php".
Because the application writes the final file path back to the user interface, the attacker does not need to guess the generated UNIX timestamp. The attacker reads the generated URL directly from the "View" link inside the HTTP response, then navigates to the uploaded script to execute arbitrary commands on the hosting server.
The impact of this vulnerability is critical, carrying a CVSS score of 8.8. Successful exploitation grants the attacker full remote code execution in the context of the user running the web server daemon, typically "www-data" or a dedicated low-privilege service account.
From this position, the attacker can read sensitive configuration files, including database credentials stored in the application's configuration path. This access can be leveraged to extract ERP data, manipulate financial or employee records, or escalate privileges on the host system depending on local OS configurations.
Furthermore, because the target directories are web-accessible and lacked restrictive access control headers or ".htaccess" configuration blocks, the backdoor remains persistently available. The system's integrity, availability, and confidentiality are completely compromised if an unauthorized operator executes command shells on the backend.
To remediate this vulnerability, developers must restructure the document upload logic. The application must avoid using user-controlled names for the direct filesystem storage path. Developers should generate random, extensionless identifiers (such as a UUID or "uniqid()") on the backend, and map these identifiers to the original filenames in a secured database table.
An alternative mitigation involves configuring the web server to deny script execution in the upload directory. For Apache servers, an ".htaccess" file should be deployed inside the "/company/0/documents/" directory to block the PHP interpreter. This prevents the server from executing scripts even if they are successfully uploaded.
# Disable engine execution in the upload folder
php_admin_flag engine off
RemoveHandler .php
SetHandler noneThe ideal secure architecture pattern requires moving the upload storage directory completely outside of the web server's document root. Files should be retrieved and served exclusively through an application routing gateway that validates authorization and streams the file using proper content-disposition headers.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
NotrinosERP Notrinos | <= 1.0.0 | None |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-434, CWE-79, CWE-22 |
| Attack Vector | Network |
| CVSS Severity | 8.8 (High) |
| EPSS Score | N/A |
| Impact | Remote Code Execution (RCE) |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
The product allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.
Grav CMS prior to version 1.7.53 and 2.0.0-rc.8 is vulnerable to an unauthenticated remote denial of service (DoS) vulnerability. By supplying crafted query parameters with extremely large dimensions to image assets, remote unauthenticated attackers can force the server to allocate massive amounts of system memory, leading to kernel Out-Of-Memory (OOM) termination of web worker processes.
CVE-2026-53657 is a local privilege escalation vulnerability in Lima (lima-vm/lima) affecting versions prior to 2.1.3 when configured with the QEMU driver. The guest agent daemon, running as root, creates its communication socket `/run/lima-guestagent.sock` with world-writable permissions (0777). This allows unprivileged local users to command the agent to establish arbitrary tunnels, including to privileged local UNIX sockets (like D-Bus). Because the target daemon authenticates the incoming connection using the credentials of the root-owned guest agent (via SO_PEERCRED), unprivileged users can perform root operations, resulting in complete guest VM compromise.
An unauthenticated Denial of Service vulnerability exists in the s2n-quic library's CryptoStream reassembler due to a lack of buffer limits on out-of-order cryptographic frames. An attacker can transmit a crafted CRYPTO frame with an extremely high offset and nominal payload, forcing the receiver to execute unbounded memory allocations and causing service crashes.
A JNDI Injection and Deserialization Gadget vulnerability exists in mchange-commons-java prior to version 0.6.0. The com.mchange.v2.naming.JavaBeanObjectFactory component permits arbitrary class instantiation and setter invocation, allowing attackers to perform Server-Side Request Forgery (SSRF) and remote class loading.
SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.
CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.