Custom Post Template Security & Risk Analysis

wordpress.org/plugins/custom-post-template

Provides a drop-down to select different templates for posts from the post edit screen. The templates replace single.php for the specified post.

10K active installs v1.5 PHP + WP 3.4+ Updated Nov 28, 2017
posttemplatetheme
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Custom Post Template Safe to Use in 2026?

Generally Safe

Score 85/100

Custom Post Template has no known CVEs and is actively maintained. It's a solid choice for most WordPress installations.

No known CVEs Updated 8yr ago
Risk Assessment

The "custom-post-template" plugin v1.5 exhibits a concerning security posture due to significant weaknesses in output sanitization and a lack of fundamental security checks. While the absence of known CVEs and the use of prepared statements for SQL are positive indicators, they are overshadowed by critical vulnerabilities identified in the static analysis. Specifically, the plugin has a very low percentage of properly escaped output (6%), suggesting a high risk of cross-site scripting (XSS) vulnerabilities. Furthermore, taint analysis revealed two flows with unsanitized paths, indicating potential for insecure handling of user-supplied data that could lead to unintended code execution or data compromise. The complete absence of nonce checks and capability checks across all entry points, coupled with zero AJAX handlers or REST API routes that *do* have auth checks, exposes the plugin to potential privilege escalation and unauthorized access if any attack vectors were discovered.

Despite the lack of recorded historical vulnerabilities, this does not negate the immediate risks identified in the current version's code. The plugin's zero entry points without authentication is misleading, as the lack of *any* explicit authentication checks on the limited entry points suggests a false sense of security. The plugin demonstrates poor security practices in output handling and data sanitization, leaving it vulnerable to common web attacks. While the intention might be a limited attack surface, the method of achieving this through neglecting security best practices is a significant weakness. The plugin's strengths lie in its use of prepared statements for SQL and no known historical issues, but these are severely undermined by the identified code-level risks.

Key Concerns

  • Low output escaping percentage
  • Unsanitized paths in taint flows
  • Missing nonce checks
  • Missing capability checks
Vulnerabilities
None known

Custom Post Template Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Code Analysis
Analyzed Mar 16, 2026

Custom Post Template Code Analysis

Dangerous Functions
0
Raw SQL Queries
0
0 prepared
Unescaped Output
17
1 escaped
Nonce Checks
0
Capability Checks
0
File Operations
0
External Requests
0
Bundled Libraries
0

Output Escaping

6% escaped18 total outputs
Data Flows
2 unsanitized

Data Flow Analysis

2 flows2 with unsanitized paths
show_config (plugin.php:603)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface

Custom Post Template Attack Surface

Entry Points0
Unprotected0
WordPress Hooks 8
actionadmin_initcustom-post-templates.php:51
actionsave_postcustom-post-templates.php:52
filtersingle_templatecustom-post-templates.php:53
filterbody_classcustom-post-templates.php:54
actioninitplugin.php:124
actioninitplugin.php:527
actionsidebar_admin_setupplugin.php:553
actionsidebar_admin_pageplugin.php:554
Maintenance & Trust

Custom Post Template Maintenance & Trust

Maintenance Signals

WordPress version tested3.4.2
Last updatedNov 28, 2017
PHP min version
Downloads246K

Community Trust

Rating96/100
Number of ratings43
Active installs10K
Developer Profile

Custom Post Template Developer Profile

Simon Wheatley

2 plugins · 40K total installs

84
trust score
Avg Security Score
85/100
Avg Patch Time
30 days
View full developer profile
Detection Fingerprints

How We Detect Custom Post Template

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/custom-post-template/css/admin.css/wp-content/plugins/custom-post-template/js/admin.js
Script Paths
/wp-content/plugins/custom-post-template/js/admin.js
Version Parameters
custom-post-template/css/admin.css?ver=custom-post-template/js/admin.js?ver=

HTML / DOM Fingerprints

CSS Classes
post-templatepost-template-{$template_file}-php
Data Attributes
custom_post_templatecustom_post_template_present
FAQ

Frequently Asked Questions about Custom Post Template