Summary
CVE-2026-49827 is a critical unrestricted file upload vulnerability in WebErpMesv2, a web-based manufacturing execution and resource management system published by SMEWebify. The HR Expense module’s scan_file parameter allows any self-registered user to upload arbitrary PHP files to a web-accessible directory, which can be executed to achieve remote code execution. Because the application ships with open self-registration and broken role-based access middleware, the vulnerability is effectively exploitable by unauthenticated remote attackers on default installations, and it carries a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause: The HR Expense upload handler in
HumanResourcesController.php(around lines 317–321) moves files submitted via thescan_fileparameter into the web-accessible directorypublic/file/Expense/using the original filename, without server-side MIME-type validation or a file-extension allowlist. This preserves the.phpextension of uploaded files. - Trigger conditions: WebErpMesv2 allows open, unauthenticated self-registration, and its role-based access middleware does not correctly restrict access to the HR Expense functionality. This combination means an attacker does not need legitimate, pre-provisioned credentials to reach the vulnerable upload endpoint.
- Attack vector: Network — an attacker self-registers an account (or otherwise reaches the endpoint due to the middleware flaw), uploads a PHP file disguised with an image content-type through the HR Expense
scan_fileparameter, and then requests the stored file at its predictable web-accessible path to trigger PHP code execution. - Impact: Full remote code execution on the underlying server, with complete loss of confidentiality, integrity, and availability of the host and any data it processes (CIA all rated High).
Affected software
- Vendor: SMEWebify
- Product: WebErpMesv2
- Affected versions: 1.19 and earlier (advisory data also cites version 1.18 and earlier as vulnerable; no version is confirmed as officially patched at time of publication)
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: No officially confirmed patched release has been documented for this advisory; organizations running WebErpMesv2 1.19 or earlier should apply the fix referenced in commit
5c54862fa044b363fd2be03d586750e81afd6818in the SMEWebify/WebErpMesv2 repository, or upgrade to the earliest available release that incorporates this fix once published. - If no patch is available/applied, implement the following workarounds:
- Disable or restrict open user self-registration until the fix is deployed.
- Enforce a strict server-side file-extension allowlist (e.g., jpg, jpeg, png, pdf) on the HR Expense upload feature, and validate MIME type server-side rather than trusting client-supplied headers.
- Store uploaded files outside the web root, or serve them with randomized, non-executable filenames and disable script execution (e.g., PHP handlers) in the upload directory.
- Audit and correct the role-based access middleware so that authorization failures deny access by default.
- Restrict network exposure of the application (e.g., place it behind a VPN or IP allowlist) until remediation is confirmed, and monitor for unexpected files or requests under
public/file/Expense/.

