CVE-2022-26352
Description
An issue was discovered in the ContentResource API in dotCMS 3.0 through 22.02. Attackers can craft a multipart form request to post a file whose filename is not initially sanitized. This allows directory traversal, in which the file is saved outside of the intended storage location. If anonymous content creation is enabled, this allows an unauthenticated attacker to upload an executable file, such as a .jsp file, that can lead to remote code execution.
Summary dbcve.org
The ContentResource API in dotCMS versions 3.0 through 22.02 fails to sanitize filenames in multipart form uploads, allowing directory traversal that writes files outside the intended storage directory. When anonymous content creation is enabled, an unauthenticated attacker can upload an executable file (e.g., a .jsp file) into a web-accessible path, achieving remote code execution.
Mitigation
Upgrade dotCMS to a patched version beyond 22.02 that sanitizes uploaded filenames and prevents path traversal in the ContentResource API. As an interim measure, disable anonymous content creation and restrict upload of executable file types until the upgrade is applied.