Critical code_pattern
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses Resolved · false_positive_defensive_string_check
1d ago
| Slug | learnpress |
|---|---|
| Pattern | serialized_admin_role |
| Kind | builtin |
| Version | 4.3.5 |
| Hit count | 1 |
| First hit |
|
| Explanation | plugin source contains `s:13:"administrator"` — the PHP-serialized representation of the `administrator` role meta value. Used to bypass `wp_insert_user()` by writing directly to `wp_usermeta` with a hand-crafted capabilities string. Near-zero FP because legit code uses `WP_User::set_role()` instead of building the serialized form by hand. |
View raw JSON
{
"slug": "learnpress",
"pattern": "serialized_admin_role",
"kind": "builtin",
"version": "4.3.5",
"hit_count": 1,
"first_hit": {
"file": "inc/admin/lp-admin-functions.php",
"line": 806,
"snippet": "'%' . $wpdb->esc_like( 's:13:\"administrator\"' ) . '%',"
},
"explanation": "plugin source contains `s:13:\"administrator\"` \u2014 the PHP-serialized representation of the `administrator` role meta value. Used to bypass `wp_insert_user()` by writing directly to `wp_usermeta` with a hand-crafted capabilities string. Near-zero FP because legit code uses `WP_User::set_role()` instead of building the serialized form by hand."
}