Custom Body Class Security & Risk Analysis

wordpress.org/plugins/wp-custom-body-class

A plain simple plugin which allows you to add a custom CSS class the HTML body tag.

10K active installs v0.7.5 PHP + WP 5.2.0+ Updated Jul 27, 2025
bodyclasscsscustom
99
A · Safe
CVEs total2
Unpatched0
Last CVEDec 12, 2019
Safety Verdict

Is Custom Body Class Safe to Use in 2026?

Generally Safe

Score 99/100

Custom Body Class has a strong security track record. Known vulnerabilities have been patched promptly.

2 known CVEsLast CVE: Dec 12, 2019Updated 8mo ago
Risk Assessment

The "wp-custom-body-class" v0.7.5 plugin exhibits a mixed security posture. On the positive side, it demonstrates good practices by using prepared statements for all SQL queries, implementing nonce checks, and including capability checks. The absence of AJAX handlers, REST API routes, shortcodes, and cron events significantly limits the direct attack surface. However, the taint analysis reveals two flows with unsanitized paths, both classified as high severity. This suggests a potential for vulnerabilities where user-supplied input might be processed without adequate sanitization, despite the overall low number of flows analyzed.

The plugin's vulnerability history is a significant concern. It has a total of two known CVEs, one of which was a high severity vulnerability and another a medium severity. While there are currently no unpatched vulnerabilities, the past occurrence of Cross-Site Request Forgery (CSRF) and Cross-Site Scripting (XSS) vulnerabilities, and the recent nature of the last vulnerability (2019), indicate that the plugin has had issues with input sanitization and security in the past. This historical context, combined with the high-severity taint flows, warrants careful consideration.

In conclusion, while the plugin has made efforts to implement secure coding practices like prepared statements and checks, the presence of high-severity taint flows and a history of significant vulnerabilities are considerable weaknesses. The low number of analyzed flows might be misleading, and the identified taint issues require immediate attention and remediation to ensure user data and site integrity.

Key Concerns

  • High severity taint flows found
  • Past High severity vulnerability
  • Past Medium severity vulnerability
  • 76% of output properly escaped
Vulnerabilities
2

Custom Body Class Security Vulnerabilities

CVEs by Year

2 CVEs in 2019
2019
Patched Has unpatched

Severity Breakdown

High
1
Medium
1

2 total CVEs

CVE-2019-6030high · 8.8Cross-Site Request Forgery (CSRF)

Custom Body Class <= 0.6.0 - Cross-Site Request Forgery

Dec 12, 2019 Patched in 0.7.0 (1503d)
CVE-2019-6029medium · 6.1Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Custom Body Class <= 0.6.0 - Cross-Site Scripting

Dec 12, 2019 Patched in 0.7.0 (1503d)
Code Analysis
Analyzed Mar 16, 2026

Custom Body Class Code Analysis

Dangerous Functions
0
Raw SQL Queries
0
2 prepared
Unescaped Output
21
67 escaped
Nonce Checks
2
Capability Checks
4
File Operations
0
External Requests
0
Bundled Libraries
0

SQL Query Safety

100% prepared2 total queries

Output Escaping

76% escaped88 total outputs
Data Flows
2 unsanitized

Data Flow Analysis

2 flows2 with unsanitized paths
run (core\classes\Processor.php:86)
Source (user input) Sink (dangerous op) Sanitizer Transform Unsanitized Sanitized
Attack Surface

Custom Body Class Attack Surface

Entry Points0
Unprotected0
WordPress Hooks 7
actioninitclass-custom_body_class.php:73
actionadmin_menuclass-custom_body_class.php:75
filterbody_classclass-custom_body_class.php:82
actionadmin_enqueue_scriptsclass-custom_body_class.php:98
actionadd_meta_boxesclass-custom_body_class.php:101
actionsave_postclass-custom_body_class.php:102
actioninitcustom_body_class.php:60
Maintenance & Trust

Custom Body Class Maintenance & Trust

Maintenance Signals

WordPress version tested6.8.5
Last updatedJul 27, 2025
PHP min version
Downloads117K

Community Trust

Rating100/100
Number of ratings21
Active installs10K
Developer Profile

Custom Body Class Developer Profile

Andrei Lupu

1 plugin · 10K total installs

78
trust score
Avg Security Score
99/100
Avg Patch Time
1503 days
View full developer profile
Detection Fingerprints

How We Detect Custom Body Class

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

Asset Fingerprints

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

HTML / DOM Fingerprints

CSS Classes
custom-body-class-admin-container
HTML Comments
<!-- wp:paragraph --><!-- /wp:paragraph --><!-- wp:group --><!-- /wp:group -->+2 more
Data Attributes
data-custom-body-class-iddata-custom-body-class-post-id
JS Globals
custom_body_class_post_values
FAQ

Frequently Asked Questions about Custom Body Class