The module upload endpoint 'POST /openmrs/ws/rest/v1/module' is susceptible to a Zip Slip path traversal attack. This occurs during the automatic extraction of uploaded .omod archives within the `startModule()` function of `WebModuleUtil`. The system only verifies if the full entry path starts with `..`, failing to normalize the path or perform boundary checks on entries starting with `web/module/`. Consequently, a crafted archive containing entries such as `web/module/../../../../malicious.jsp` can result in files being written outside the intended module directory.
An authenticated attacker with module upload permissions can write arbitrary files to locations like the web application root. By uploading a JSP file and requesting it, the attacker can achieve remote code execution. Additionally, the `module.allow web admin` runtime property, intended to restrict web-based module administration, is not enforced in the REST API upload path, allowing the restriction to be bypassed.