{"summary":{"plugin_name":"insert-headers-and-footers","display_name":"WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager","version":"2.4.2","risk_level":"low","risk_score":25.0,"risk_factors":{"static_analysis":5,"owasp":5,"attack_surface":15,"superglobal_density":5,"filter_hooks":5,"installs_modifier":-10},"last_analyzed":"2026-11-24T20:55:04.694794","removed_from_directory":false,"closed_reason":null,"closed_date":null,"commercial":false,"free_counterpart":null,"active_installs":3000000,"rating":98,"num_ratings":1938,"tested":"7.1.5","requires":"5.0","requires_php":"7.0","author":"Syed Balkhi","short_description":"Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert ads pixel code, and more.","tags":["code","code-snippets","css","header","php"],"added":"2012-07-12","last_updated":"2026-11-12 9:42am GMT","metadata_fetched_at":"2026-11-23T06:46:14.727039+00:00","modules_missing":[],"modules_failed":[],"latest_release":"2.4.2"},"security_metrics":{"total_issues":4,"parameters_found":92,"unknown_parameters":2,"headers_accessed":3,"cookies_accessed":0,"wp_hooks":2,"rest_routes":0,"query_vars":0,"shortcode_atts":0,"rest_routes_with_access_patterns":0,"file_upload_parameters":1,"owasp_findings":{"A01":2,"A02":1,"A03":4,"A04":1,"A07":1},"attack_surface_level":"large","attack_surface_score":99,"tainted_sinks":152,"tainted_sql":0,"tainted_ssrf":0,"tainted_file_ops":0,"auth_bypass_sinks":0,"dangerous_patterns":2},"comparison":{"percentile":71.1,"rank":145867,"peer_count":504269,"better_than":71.1,"risk_distribution":{"low":103004,"high":178400,"medium":121926,"critical":38994,"minimal":61945}},"executive_summary":null,"vulnerabilities":[{"id":"3c4318a9-a3c5-409b-a52e-edd8583c3c43","title":"WPCode < 2.0.7 - Contributor+ WPCode Library Auth Key Update/Deletion","created_at":"2023-02-09T08:51:13.000Z","updated_at":"2023-02-09T08:51:13.000Z","published_date":"2023-02-09T00:00:00.000Z","vuln_type":"INCORRECT AUTHORISATION","references":{"cve":["2023-0328"]},"verified":true,"poc":null,"description":null,"cvss":null,"fixed_in":"2.0.7","introduced_in":null},{"id":"132b70e5-4368-43b4-81f6-2d01bc09dc8f","title":"WPCode Lite < 2.0.9 - Arbitrary Log File Deletion via CSRF","created_at":"2023-04-03T07:33:28.000Z","updated_at":"2023-04-03T07:33:28.000Z","published_date":"2023-04-03T00:00:00.000Z","vuln_type":"CSRF","references":{"cve":["2023-1624"]},"verified":true,"poc":null,"description":null,"cvss":null,"fixed_in":"2.0.9","introduced_in":null},{"id":"89570379-769b-4684-b8a7-28c37b408e5d","title":"WPCode < 2.0.13.1 - Reflected XSS","created_at":"2023-07-17T12:54:15.000Z","updated_at":"2023-07-17T12:54:16.000Z","published_date":"2023-07-17T00:00:00.000Z","vuln_type":"XSS","references":{"cve":["2023-3524"]},"verified":true,"poc":null,"description":null,"cvss":null,"fixed_in":"2.0.13.1","introduced_in":null},{"id":"a36c3b6f-c8e4-485a-b4ab-6f77a957c67d","title":"WPCode < 2.3.6 - Author+ Remote Code Execution via XML-RPC wp.newPost","created_at":"2026-05-26T22:02:20.000Z","updated_at":"2026-05-26T22:02:20.000Z","published_date":"2026-05-26T00:00:00.000Z","vuln_type":"RCE","references":{"url":["https://www.wordfence.com/threat-intel/vulnerabilities/id/75a2e8b1-d5e0-4f7b-a70a-f0aadf58c778"],"cve":["2026-8832"]},"verified":false,"poc":null,"description":null,"cvss":null,"fixed_in":"2.3.6","introduced_in":null},{"id":"e60dade1-a7af-4570-bfd6-669d10991d67","title":"WPCode 2.0.0 - 2.3.9 - Unauthenticated Snippet Suppression via Safe Mode Bypass","created_at":"2026-10-12T14:02:46.000Z","updated_at":"2026-10-12T14:02:46.000Z","published_date":"2026-10-12T00:00:00.000Z","vuln_type":"BYPASS","references":{"cve":["2026-101301"]},"verified":true,"poc":null,"description":null,"cvss":null,"fixed_in":"2.4.0","introduced_in":"2.0.0"}],"recommendations":[{"category":"A03","name":"Injection","severity":"high","findings_count":4,"description":"User-supplied data is not validated, filtered, or sanitized by the application","recommendations":["Use $wpdb->prepare() for all database queries — never interpolate or concatenate input","Sanitize all user input with appropriate WordPress functions","Escape output based on context (esc_html, esc_attr, etc.)","Never pass user input to eval(), include/require, or a variable function"],"findings_summary":["Parameter 'execute_now' - Parameter name suggests injection sink — verify sanitization","Reachable 'file_include' sink x140 - 140 attacker-reachable 'file_include' sink(s) found by the reachability analyzer","Reachable 'code_exec' sink x1 - 1 attacker-reachable 'code_exec' sink(s) found by the reachability analyzer","Pattern 'sqli_interpolated' x2 - Interpolated variable in SQL query string (2 occurrence(s))"]},{"category":"A01","name":"Broken Access Control","severity":"medium","findings_count":2,"description":"Access control enforces policy such that users cannot act outside of their intended permissions","recommendations":["Add a real permission_callback to every REST route — never '__return_true' for state-changing endpoints","Verify nonces on all wp_ajax_nopriv_ handlers and re-check capabilities server-side","Validate and canonicalize file paths to block traversal on read/write/delete operations","Never trust a user-supplied role/capability — enforce it against the acting user's own permissions"],"findings_summary":["Reachable 'option_update' sink x4 - 4 attacker-reachable 'option_update' sink(s) found by the reachability analyzer","Reachable 'redirect' sink x2 - 2 attacker-reachable 'redirect' sink(s) found by the reachability analyzer"]},{"category":"A07","name":"Identification and Authentication Failures","severity":"medium","findings_count":1,"description":"Functions related to a user's identity, authentication, or session management","recommendations":["Enforce strong passwords and rate-limit login attempts","Add MFA/2FA for privileged accounts","Use wp_verify_nonce() and capability checks together — neither alone is sufficient","Audit any authenticate / determine_current_user filter for bypass paths"],"findings_summary":["Parameter 'requires_passkey' - Authentication-related parameter — verify login flow hardening"]},{"category":"A02","name":"Cryptographic Failures","severity":"low","findings_count":1,"description":"Failures related to cryptography which often lead to exposure of sensitive data","recommendations":["Never store passwords or API keys in plain text","Use WordPress options API with encryption for sensitive data","Implement proper key management practices","Use HTTPS for all sensitive data transmission"],"findings_summary":["Parameter 'webhook_secret' - Sensitive data exposure"]},{"category":"A04","name":"Insecure Design","severity":"low","findings_count":1,"description":"Missing or ineffective control design — e.g. plugin files that perform work when requested directly, bypassing the WordPress bootstrap","recommendations":["Add a `defined('ABSPATH') || exit;` guard to every PHP file so it cannot be requested directly","Move logic out of directly-reachable files into hook callbacks loaded by WordPress","Threat-model unauthenticated entry points during design, not after release"],"findings_summary":["Direct file access: 17 plugin file(s) reachable by direct HTTP request, bypassing the WordPress bootstrap — insecure design"]}],"owasp_findings":{"A01":[{"type":"reachability_sink","sink":"option_update","count":4,"risk":"4 attacker-reachable 'option_update' sink(s) found by the reachability analyzer"},{"type":"reachability_sink","sink":"redirect","count":2,"risk":"2 attacker-reachable 'redirect' sink(s) found by the reachability analyzer"}],"A02":[{"type":"parameter","name":"webhook_secret","locations":{"POST":[{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/class-wpcode-library-auth.php","line":118,"offset":3136,"snippet":"$_POST['webhook_secret']"},{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/class-wpcode-library-auth.php","line":118,"offset":3179,"snippet":"$_POST['webhook_secret']"}]},"risk":"Sensitive data exposure"}],"A03":[{"type":"parameter","name":"execute_now","locations":{"POST":[{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/admin/pages/class-wpcode-admin-page-snippet-manager.php","line":1461,"offset":53879,"snippet":"$_POST['execute_now']"},{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/admin/pages/class-wpcode-admin-page-snippet-manager.php","line":1461,"offset":53924,"snippet":"$_POST['execute_now']"}]},"risk":"Parameter name suggests injection sink — verify sanitization"},{"type":"reachability_sink","sink":"file_include","count":140,"risk":"140 attacker-reachable 'file_include' sink(s) found by the reachability analyzer"},{"type":"reachability_sink","sink":"code_exec","count":1,"risk":"1 attacker-reachable 'code_exec' sink(s) found by the reachability analyzer"},{"type":"pattern_match","pattern":"sqli_interpolated","count":2,"severity":"critical","examples":["includes/admin/importers/class-wpcode-importer-post-snippets.php:50","includes/admin/importers/class-wpcode-importer-post-snippets.php:55"],"risk":"Interpolated variable in SQL query string (2 occurrence(s))"}],"A04":[{"type":"direct_file_access","count":17,"risk":"17 plugin file(s) reachable by direct HTTP request, bypassing the WordPress bootstrap — insecure design"}],"A07":[{"type":"parameter","name":"requires_passkey","locations":{"POST":[{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/class-wpcode-library-auth.php","line":231,"offset":7339,"snippet":"$_POST['requires_passkey']"},{"file":"/plugins/insert-headers-and-footers/tags/2.4.2/includes/class-wpcode-library-auth.php","line":231,"offset":7383,"snippet":"$_POST['requires_passkey']"}]},"risk":"Authentication-related parameter — verify login flow hardening"}]}}