CVE-2026-18438: CWE-434 Unrestricted Upload of File with Dangerous Type in wpdevteam Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud!
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.
AI Analysis
Technical Summary
CVE-2026-18438 describes a remote code execution vulnerability in the Templately – Elementor & Gutenberg Template Library WordPress plugin (up to and including version 3.7.1). The vulnerability arises from a mismatch in file validation within the fetch_remote_file function: the plugin validates the file type based on the Content-Disposition header filename, which is attacker-controlled, rather than the actual destination filename derived from the URL path. This allows an authenticated attacker with contributor-level privileges to upload a GIF+PHP polyglot file that passes validation as an image but is saved with a .php extension, enabling execution of arbitrary code on the server. The REST API endpoints involved (/templately/v1/clouds/upload, /templately/v1/insert, and /templately/v1/login) are protected only by a current_user_can('delete_posts') check, insufficiently restricting access. The vulnerability also allows overwriting the global Templately cloud connection. Remediation involves correcting file type validation to use the destination filename and restricting REST API routes to administrator-level capabilities.
Potential Impact
An attacker with contributor-level access can upload and execute arbitrary PHP code on the server, leading to full compromise of the WordPress site. The vulnerability allows bypassing file upload restrictions and capability checks, enabling remote code execution and potential site takeover. Additionally, the attacker can overwrite the global cloud connection settings, potentially affecting site functionality or further persistence.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict contributor-level users from accessing the vulnerable REST API endpoints if possible, and monitor for suspicious file uploads. A complete fix requires updating the plugin to validate file types against the actual destination filename and restricting sensitive REST API routes to administrator-level capabilities.
CVE-2026-18438: CWE-434 Unrestricted Upload of File with Dangerous Type in wpdevteam Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud!
Description
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.
CVSS v3.1
Score 8.8high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-18438 describes a remote code execution vulnerability in the Templately – Elementor & Gutenberg Template Library WordPress plugin (up to and including version 3.7.1). The vulnerability arises from a mismatch in file validation within the fetch_remote_file function: the plugin validates the file type based on the Content-Disposition header filename, which is attacker-controlled, rather than the actual destination filename derived from the URL path. This allows an authenticated attacker with contributor-level privileges to upload a GIF+PHP polyglot file that passes validation as an image but is saved with a .php extension, enabling execution of arbitrary code on the server. The REST API endpoints involved (/templately/v1/clouds/upload, /templately/v1/insert, and /templately/v1/login) are protected only by a current_user_can('delete_posts') check, insufficiently restricting access. The vulnerability also allows overwriting the global Templately cloud connection. Remediation involves correcting file type validation to use the destination filename and restricting REST API routes to administrator-level capabilities.
Potential Impact
An attacker with contributor-level access can upload and execute arbitrary PHP code on the server, leading to full compromise of the WordPress site. The vulnerability allows bypassing file upload restrictions and capability checks, enabling remote code execution and potential site takeover. Additionally, the attacker can overwrite the global cloud connection settings, potentially affecting site functionality or further persistence.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict contributor-level users from accessing the vulnerable REST API endpoints if possible, and monitor for suspicious file uploads. A complete fix requires updating the plugin to validate file types against the actual destination filename and restricting sensitive REST API routes to administrator-level capabilities.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-07-30T20:22:04.692Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a803456bf8831d539dc5051
Added to database: 08/15/2026, 09:41:42 UTC
Last enriched: 08/22/2026, 13:15:01 UTC
Last updated: 09/05/2026, 10:52:07 UTC
Views: 54
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.