CVE-2026-18438

Templately <= 3.7.1 - Authenticated (Contributor+) Arbitrary File Upload to Remote Code Execution via Gutenberg Cloud Import Attachment Filename Mismatch

2026-08-14 20:45
Dmitrii Ignatyev

Strategic Overview

Status
Patched in 3.7.2
Affected Version
<= 3.7.1
CVSS
8.8High
Weakness type
CWE-434 · Unrestricted Upload of File with Dangerous Type
CVE
CVE-2026-18438
View all Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! vulnerabilities

At a glance

CVE-2026-18438 is a high-severity Unrestricted Upload of File with Dangerous Type vulnerability in the Templately WordPress plugin, affecting versions <= 3.7.1. It carries a CVSS score of 8.8 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires an authenticated account at Contributor level or above. The issue is fixed in version 3.7.2; sites on affected versions should update now. Disclosed August 2026, reported by Dmitrii Ignatyev.

Vulnerability Overview

The Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 3.7.1 via the fetch_remote_file function. This is due to a filename validation/destination mismatch in fetch_remote_file, where file type validation is performed against the attacker-controlled Content-Disposition filename rather than the URL-path-derived destination filename. This makes it possible for authenticated attackers, with contributor-level access and above, to execute code on the server. A GIF+PHP polyglot file passes wp_check_filetype_and_ext validation as image/gif via the Content-Disposition filename, while the actual destination path is written with a .php extension derived from the URL path, bypassing the unfiltered_upload capability gate entirely. The affected endpoints are reachable at this privilege level because Templately's entire REST API — including the cloud import endpoints used in this attack (/templately/v1/clouds/upload and /templately/v1/insert) — is authorized only by a current_user_can('delete_posts') check, with no administrator or manage_options capability requirement. The same permission gate also allows a contributor to overwrite the site's global Templately cloud connection via the /templately/v1/login endpoint with global_signin set to true. A complete remediation should both correct fetch_remote_file to validate the file type against the actual destination filename rather than the Content-Disposition header (and avoid deriving the write path from the request URL), and restrict state-changing Templately REST routes to an appropriate administrator-level capability.

Technical Analysis

The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.

CWE-434: Unrestricted Upload of File with Dangerous Type

Templately <= 3.7.1 carries this weakness at delete_posts, and reaching it takes an account at Contributor level or above. An unrestricted file upload lets a caller store a file whose type or destination the application does not properly constrain.

If an uploaded file lands anywhere the server will execute, the flaw becomes remote code execution and the site should be treated as fully compromised. For Templately the fix is 3.7.2: builds <= 3.7.1 are affected, anything from 3.7.2 onward is not.

Remediation

Update to version 3.7.2, or a newer patched version

How does WordSec protect against this?

An attacker needs Contributor access first, so the firewall sees the attempt as traffic from a logged-in account: WordSec's web application firewall inspects request payloads before WordPress loads them. Classes like this one can leave something behind, so the staged malware scanner is the second half: it looks for dropped files and modified code rather than for the request that created them. None of that substitutes for the fix: Templately 3.7.2 closes this, and updating the plugin is the step that ends it.

  • Firewall
  • Scanner
  • Alerts

External References

Related records

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C