Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2567+ Articles
161+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-18438: Templately WordPress Plugin RCE via File Upload
CVE-2026-18438: Templately WordPress Plugin RCE via File Upload
SECURITYHIGHCVE-2026-18438

CVE-2026-18438: Templately WordPress Plugin RCE via File Upload

CVSS 8.8 flaw in Templately for WordPress lets authenticated subscribers execute arbitrary code via a filename validation bypass in file upload.

Dylan H.

Security Team

August 16, 2026
4 min read

Affected Products

  • Templately Plugin for WordPress <= 3.7.1

Executive Summary

A high-severity Remote Code Execution vulnerability (CVE-2026-18438) has been disclosed in the Templately plugin for WordPress — a popular template library plugin offering over 6,500 free and pro templates for Elementor and Gutenberg. The flaw carries a CVSS score of 8.8 and allows authenticated attackers with subscriber-level access to upload and execute arbitrary code on the server.

CVSS Score: 8.8 (High)

The vulnerability resides in the plugin's fetch_remote_file() function, which contains a filename validation and destination path mismatch. An attacker can exploit this flaw to write arbitrary PHP files to locations outside of intended directories, bypassing upload restrictions and achieving remote code execution.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-18438
CVSS Score8.8 (High)
TypeAuthenticated Remote Code Execution via File Upload
Attack VectorNetwork
Privileges RequiredLow (Subscriber role or above)
User InteractionNone
Affected PluginTemplately ≤ 3.7.1

Affected Versions

PluginAffected VersionsStatus
Templately — Elementor & Gutenberg Template LibraryAll versions ≤ 3.7.1Patch required

Technical Details

The fetch_remote_file() function in Templately is designed to retrieve remote template assets and store them locally. The vulnerability stems from a validation/destination mismatch: the function validates the filename for safe characters but then writes the file to a destination path derived separately, allowing an attacker to craft a request where the validated name and the actual write path diverge.

By exploiting this mismatch, an attacker with at least subscriber-level access can write a PHP file to a web-accessible directory, then access it directly via HTTP to execute arbitrary server-side code.

Attack Sequence

1. Attacker registers a subscriber account (or uses compromised credentials)
2. Attacker crafts request to fetch_remote_file() with malicious payload
3. Filename validation passes on the sanitized component
4. Actual write operation targets attacker-controlled destination path
5. PHP webshell written to web-accessible wp-content directory
6. Attacker accesses webshell via HTTP — full RCE achieved

Impact of Successful Exploitation

ImpactDescription
Remote Code ExecutionExecute arbitrary PHP code on the server
Database CompromiseAccess WordPress database via wp-config.php
Webshell PersistenceUploaded PHP files survive plugin updates
Lateral MovementPivot to other sites on shared hosting infrastructure
Data ExfiltrationRead all site files and sensitive configuration
Malware DistributionInject malicious code served to site visitors

Immediate Remediation

Step 1: Update Templately

# Via WP-CLI
wp plugin update templately
 
# Verify installed version
wp plugin get templately --field=version

Or update through WordPress admin: Plugins > Installed Plugins > Templately > Update Now.

Step 2: Scan for Uploaded Webshells

# Find PHP files recently added to upload directories
find /var/www/html/wp-content/ -name "*.php" -newer /var/www/html/wp-includes/version.php -type f
 
# Scan for common webshell signatures
grep -rl "eval(base64_decode" /var/www/html/wp-content/
grep -rl "system(" /var/www/html/wp-content/uploads/
grep -rl "passthru\|shell_exec\|exec(" /var/www/html/wp-content/
 
# Verify WordPress core file integrity
wp core verify-checksums

Step 3: Restrict File Permissions

# Prevent PHP execution in upload directories
cat >> /var/www/html/wp-content/uploads/.htaccess << 'EOF'
<Files *.php>
deny from all
</Files>
EOF
 
# Or via Nginx
# location ~* /wp-content/uploads/.*\.php$ { deny all; }

Step 4: Audit Subscriber Accounts

# List all subscriber accounts — remove unknown ones
wp user list --role=subscriber --fields=ID,user_login,user_email,user_registered
 
# Remove suspicious accounts
wp user delete <suspicious_user_id>

Detection Indicators

IndicatorDescription
PHP files in wp-content/uploads/Webshells uploaded via the vulnerability
Requests to Templately's API endpointsExploitation attempts
Outbound connections from web serverPost-exploitation exfiltration
Suspicious subscriber account registrationsPre-attack account creation

Post-Remediation Steps

  1. Update Templately to the patched version
  2. Scan the installation for PHP webshells in upload directories
  3. Restrict PHP execution in wp-content/uploads/ via server config
  4. Audit subscriber accounts and remove unknown registrations
  5. Rotate all credentials — WordPress admin, database, hosting
  6. Enable file integrity monitoring to detect future changes
  7. Deploy a WAF and consider restricting new account registrations

References

  • NIST NVD — CVE-2026-18438

Related Reading

  • CVE-2026-16142: TrueBooker WordPress Plugin Unauthenticated Account Takeover
  • CVE-2026-15142: Real Estate Manager Pro Privilege Escalation
#WordPress#CVE-2026-18438#RCE#Templately#File Upload#Web Security#Cloud Security

Related Articles

CVE-2026-7537: MDJM Event Management WordPress Plugin Arbitrary File Upload

A high-severity arbitrary file upload vulnerability in the MDJM Event Management plugin for WordPress allows authenticated attackers to upload malicious files…

2 min read

CVE-2026-4882: Unauthenticated File Upload in WordPress

A critical unauthenticated arbitrary file upload vulnerability in the User Registration Advanced Fields plugin for WordPress allows attackers to upload...

4 min read

CVE-2026-14894: WordPress Super Forms Plugin Critical Arbitrary File Upload

A critical unauthenticated arbitrary file upload vulnerability in the Super Forms plugin for WordPress (CVSS 9.8) allows attackers to upload and execute...

3 min read
Back to all Security Alerts