Summary
A zip slip path traversal vulnerability in the /DesignTools/SkinList.aspx endpoint of MojoPortal CMS v2.9.0.1 allows file writes outside the intended skins directory during ZIP extraction.
By uploading a crafted ZIP archive containing directory traversal paths, an attacker can place executable files on the server and ultimately achieve arbitrary command execution under the web server's privileges.
Affected context
This vulnerability occurs in MojoPortal CMS deployments that expose the /DesignTools/SkinList.aspx endpoint for uploading and managing skin (theme) packages.
The issue manifests when uploaded ZIP archives are extracted on the server without normalizing and validating embedded file paths against an allowed destination directory.
Environments that allow authenticated or semi-trusted users to upload custom skins, or where upload endpoints are not appropriately access-controlled, are particularly at risk.
Exploit preconditions
- Attack surface: HTTP(S) endpoint /DesignTools/SkinList.aspx handling ZIP uploads for skins/themes.
- Required access: Ability to authenticate (or otherwise reach) the skin upload functionality and submit ZIP files.
- Trigger point: Server-side extraction of an attacker-supplied ZIP archive containing entries with
../or absolute paths. - Why exploitation is possible: The extraction logic trusts file paths inside the ZIP and writes them directly to the file system without canonicalization or enforcement that all entries remain within the intended skins directory. This allows arbitrary file placement, including web-executable locations.
Why this happens
The underlying bug is a zip slip variant of CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
During ZIP extraction, the application uses file names from the archive entries directly to construct output paths, without:
- Canonicalizing the resulting path,
- Stripping traversal sequences like
../, - Rejecting absolute paths or paths pointing outside the designated skins directory.
This insecure pattern allows an attacker to smuggle files into arbitrary directories on the server, potentially overriding configuration or deploying executable payloads that the web server can run.
Potential impact
- Arbitrary file write outside the intended skins directory.
- Placement of web-accessible scripts that can be invoked for remote code execution.
- Overwriting existing application or configuration files, leading to service disruption.
- Planting backdoors or web shells for persistent access to the server.
- Escalation from a limited CMS account to full compromise of the web application instance.
General mitigation guidance
Effective mitigation focuses on constraining file extraction to a safe directory and hardening upload handling:
- Normalize and canonicalize each ZIP entry path before writing, and enforce that it remains strictly within an expected base directory (e.g., the skins folder).
- Reject any archive entries containing
.., drive letters, leading slashes, or other patterns that indicate traversal or absolute paths. - Use well-reviewed ZIP extraction utilities or helper functions that provide safe extraction patterns, rather than ad hoc path concatenation.
- Restrict the ability to upload skins to trusted roles and apply additional checks (e.g., file type allowlists, size limits, and content inspection).
- Run the web application with least-privilege OS accounts and ensure the process cannot write to sensitive system or application directories beyond what is necessary.
How teams detect issues like this
Security teams can detect and monitor for this class of issue using:
- Static analysis: Rules or patterns that flag use of ZIP extraction APIs where archive entry names are directly concatenated into file system paths without canonicalization or directory-bound checks.
- Code review: Look for upload handlers and import features that unpack archives; verify that path validation is performed and that only safe, normalized paths under a fixed root are permitted.
- Runtime monitoring: File integrity monitoring to detect unexpected file creation or modification outside designated upload/skin directories following ZIP uploads.
- Security testing: Targeted dynamic tests (e.g., fuzzing ZIP uploads with traversal payloads) as part of regular penetration testing and CI security checks.

