{"summary":{"plugin_name":"b2bking-wholesale-for-woocommerce","display_name":"B2BKing — Ultimate WooCommerce B2B and Wholesale Plugin — Wholesale Prices, Bulk Order Form & More","version":"5.2.80","risk_level":"medium","risk_score":30.0,"risk_factors":{"static_analysis":5,"owasp":5,"attack_surface":15,"superglobal_density":5},"last_analyzed":"2026-11-23T14:45:44.307976","removed_from_directory":false,"closed_reason":null,"closed_date":null,"commercial":false,"free_counterpart":null,"active_installs":10000,"rating":98,"num_ratings":109,"tested":"7.1.5","requires":"4.8","requires_php":"5.6.20","author":"KingsPlugins","short_description":"B2BKing is the complete solution for running a Wholesale, B2B or B2B + B2C hybrid store with WooCommerce.","tags":["b2b","wholesale","wholesale prices","woocommerce b2b","woocommerce wholesale"],"added":"2020-09-12","last_updated":"2026-11-21 10:32pm GMT","metadata_fetched_at":"2026-11-23T02:32:45.931809+00:00","modules_missing":[],"modules_failed":[],"latest_release":"5.2.80"},"security_metrics":{"total_issues":25,"parameters_found":95,"unknown_parameters":2,"headers_accessed":2,"cookies_accessed":2,"wp_hooks":2,"rest_routes":0,"query_vars":0,"shortcode_atts":0,"rest_routes_with_access_patterns":0,"file_upload_parameters":0,"owasp_findings":{"A01":1,"A02":1,"A03":5,"A07":2},"attack_surface_level":"large","attack_surface_score":97,"tainted_sinks":0,"tainted_sql":0,"tainted_ssrf":0,"tainted_file_ops":0,"auth_bypass_sinks":0,"dangerous_patterns":14},"comparison":{"percentile":67.4,"rank":164253,"peer_count":503286,"better_than":67.4,"risk_distribution":{"low":102534,"high":178330,"medium":121738,"critical":38966,"minimal":61718}},"executive_summary":null,"vulnerabilities":[],"recommendations":[{"category":"A03","name":"Injection","severity":"high","findings_count":5,"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":["phpcs_security: Easy XSS detected because of direct user input with $_GET on echo","phpcs_security: Easy XSS detected because of direct user input with $_REQUEST on echo","phpcs_security: Easy XSS detected because of direct user input with $_REQUEST on echo","phpcs_security: Easy XSS detected because of direct user input with $_REQUEST on echo","Pattern 'sqli_interpolated' x8 - Interpolated variable in SQL query string (8 occurrence(s))"]},{"category":"A01","name":"Broken Access Control","severity":"medium","findings_count":1,"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":["Pattern 'nopriv_no_nonce' x6 - Nopriv AJAX handler without nonce verification (6 occurrence(s))"]},{"category":"A07","name":"Identification and Authentication Failures","severity":"medium","findings_count":2,"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":["Auth hook 'user_register' - Hooks the 'user_register' authentication/identity flow — verify it cannot be abused to bypass authentication","Auth hook 'plugins_loaded' - Hooks the 'user_register' authentication/identity flow — verify it cannot be abused to bypass authentication"]},{"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 'consumer_secret' - Sensitive data exposure"]}],"owasp_findings":{"A01":[{"type":"pattern_match","pattern":"nopriv_no_nonce","count":6,"severity":"high","examples":["includes/class-b2bking.php:60","includes/class-b2bking.php:62","includes/class-b2bking.php:68"],"risk":"Nopriv AJAX handler without nonce verification (6 occurrence(s))"}],"A02":[{"type":"parameter","name":"consumer_secret","locations":{"GET":[{"file":"/plugins/b2bking-wholesale-for-woocommerce/tags/5.2.80/includes/class-b2bking-global-helper.php","line":2366,"offset":75314,"snippet":"$_GET['consumer_secret']"}]},"risk":"Sensitive data exposure"}],"A03":[{"type":"phpcs_security","message":"Easy XSS detected because of direct user input with $_GET on echo","file":"/plugins/b2bking-wholesale-for-woocommerce/tags/5.2.80/admin/class-b2bking-admin.php","line":7989},{"type":"phpcs_security","message":"Easy XSS detected because of direct user input with $_REQUEST on echo","file":"/plugins/b2bking-wholesale-for-woocommerce/tags/5.2.80/includes/class-b2bking.php","line":1080},{"type":"phpcs_security","message":"Easy XSS detected because of direct user input with $_REQUEST on echo","file":"/plugins/b2bking-wholesale-for-woocommerce/tags/5.2.80/includes/class-b2bking.php","line":1080},{"type":"phpcs_security","message":"Easy XSS detected because of direct user input with $_REQUEST on echo","file":"/plugins/b2bking-wholesale-for-woocommerce/tags/5.2.80/includes/class-b2bking.php","line":1084},{"type":"pattern_match","pattern":"sqli_interpolated","count":8,"severity":"critical","examples":["admin/class-b2bking-admin.php:5793","admin/class-b2bking-admin.php:5800","admin/class-b2bking-admin.php:5807"],"risk":"Interpolated variable in SQL query string (8 occurrence(s))"}],"A07":[{"type":"auth_hook","name":"user_register","risk":"Hooks the 'user_register' authentication/identity flow — verify it cannot be abused to bypass authentication"},{"type":"auth_hook","name":"plugins_loaded","risk":"Hooks the 'user_register' authentication/identity flow — verify it cannot be abused to bypass authentication"}]}}