Sep 16, 2026·5 min read·5 visits
WordPress Core contains an SQL injection vulnerability in the WP_Query class when parsing author__not_in parameters. When chained with CVE-2026-63030, unauthenticated attackers can execute arbitrary SQL and escalate privileges to Remote Code Execution.
CVE-2026-60137 is a critical SQL injection vulnerability in the Core component of WordPress. The flaw occurs within the WP_Query class during the processing of the author__not_in parameter, where user-supplied array inputs are constructed into a SQL string without strict integer type-casting. When chained with CVE-2026-63030, an unauthenticated remote attacker can exploit this SQL injection to read database values, extract administrator credential hashes, or modify administrative options to execute arbitrary PHP code on the server.
The WP_Query class serves as the fundamental engine within WordPress for querying posts, pages, and custom post types from the underlying database. It handles complex filtering options, including category restrictions, date ranges, and author parameters.
To allow developers to exclude specific author IDs from query results, the WP_Query class exposes parameters such as author__not_in and author_exclude. These parameters accept arrays of integers representing the author IDs to be omitted from the database query execution.
Because WordPress Core is designed to process highly structured, nested input, many plug-ins and themes forward client-supplied parameters directly to WP_Query. If the input is not strictly validated, malicious arrays can reach the query generator, breaking the boundary of the SQL statement and exposing a significant attack surface.
The underlying vulnerability represents a failure in parameter sanitization within the WP_Query::get_posts() method. While modern Database Abstraction Layers (DBAL) enforce prepared statements with parameter binding, legacy structures in WordPress still construct several SQL fragments dynamically.
During query construction, the author__not_in parameter is processed to generate a SQL string within the WHERE block. Ideally, WordPress should force integer type-casting on each element inside the array before concatenating it. In the vulnerable versions, the sanitization wrapper fails to properly clean elements that are not explicitly numeric.
Because the raw strings bypass sanitization, they are inserted directly into the query template. This structural weakness allows an attacker to supply a crafted array containing subqueries, UNION statements, or blind time-based SQL payloads. The final dynamically built query is executed directly via the $wpdb class, resulting in execution of unauthorized database commands.
The following representation shows the vulnerable code path inside wp-includes/class-wp-query.php compared with the security patch introduced in the fixed versions.
// Vulnerable Implementation
if ( ! empty( $q['author__not_in'] ) ) {
// Vulnerability: The array values are directly converted to string fragments without rigorous integer type-casting
$author__not_in = implode( ',', array_map( 'trim', (array) $q['author__not_in'] ) );
$this->query_vars['author__not_in'] = $author__not_in;
$where .= " AND wp_posts.post_author NOT IN ($author__not_in)";
}// Patched Implementation
if ( ! empty( $q['author__not_in'] ) ) {
// Fix: Explicitly map 'intval' to force type-casting of all array inputs to safe integers
$author__not_in = array_map( 'intval', (array) $q['author__not_in'] );
$author__not_in_string = implode( ',', $author__not_in );
$this->query_vars['author__not_in'] = $author__not_in;
$where .= " AND wp_posts.post_author NOT IN ($author__not_in_string)";
}By forcing every item in the author__not_in array to resolve to an integer via the intval function, any injected SQL syntax or non-numeric payload is neutralized to 0. The patch successfully prevents attackers from inserting nested subqueries or executing dynamic database actions.
While CVE-2026-60137 represents a medium-severity vulnerability on its own due to the lack of an unauthenticated vector, it has been paired with CVE-2026-63030 in an active exploit chain known as wp2shell.
The attack mechanism leverages the REST API Batch endpoint to achieve pre-authentication route desynchronization. The attacker sends a nested JSON batch payload to the /?rest_route=/batch/v1 endpoint, confusing the internal routing framework and bypassing permissions checks. Once unauthorized REST API endpoints are accessible, the attacker targets handlers that pass parameters directly to WP_Query.
The SQL injection payload is delivered through the author_exclude or author__not_in parameter. It is executed to retrieve administrator hash values from the wp_users table. In advanced stages of the attack, write operations are performed against the wp_options table to register a malicious plugin or overwrite page templates, achieving arbitrary PHP code execution on the hosting server.
The impact of CVE-2026-60137 when evaluated as part of the wp2shell exploit chain is critical. An unauthenticated attacker can achieve complete read access to the database, allowing for the extraction of sensitive secrets, application salts, and password hashes.
Additionally, direct write access to the database enables attackers to perform persistent administrative privilege escalation. Attackers regularly alter option parameters in the database to register backdoors, modify configuration details, or load remote files.
The vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog. Threat intelligence reports indicate widespread active scanning and exploitation of public-facing WordPress instances.
To fully address this vulnerability, administrators must apply the security updates immediately. The WordPress Security Team has backported the patch to several active release lines.
Update your environments to one of the following versions based on your current installation:
If immediate updates cannot be executed, block POST requests to /wp-json/batch/v1 and /?rest_route=/batch/v1 at your Web Application Firewall (WAF) or web server configuration. This temporarily mitigates the wp2shell exploit chain by eliminating the pre-authentication route desynchronization entry point.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
WordPress Core WordPress | >= 6.8.0, < 6.8.6 | 6.8.6 |
WordPress Core WordPress | >= 6.9.0, < 6.9.5 | 6.9.5 |
WordPress Core WordPress | >= 7.0.0, < 7.0.2 | 7.0.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-89 |
| Attack Vector | Network |
| CVSS Base Score | 5.9 (Standalone) / 9.8 (Chained) |
| Exploit Status | active |
| CISA KEV Status | Listed |
| EPSS Score | 0.78305 |
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not sanitize or incorrectly sanitizes special elements that could modify the intended SQL command when it is sent to a downstream component.
CVE-2026-61598 is a high-severity mass-assignment vulnerability (CWE-915) affecting the Python package djust prior to version 1.0.7. An authenticated client can supply arbitrary parameter names to modify public view attributes on the server via WebSocket events, leading to unauthorized state manipulation, authorization bypass, or price tampering.
An uncontrolled resource consumption vulnerability (CVE-2026-69213) in the http4s Ember HTTP/2 server and client implementations allows unauthenticated remote attackers to trigger an OutOfMemoryError (OOM) and cause a Denial of Service (DoS) by exploiting unbounded outbound queues.
A validation flaw exists in the CookieJar client middleware of the http4s library. Prior to versions 0.23.35 and 1.0.0-M47, the middleware trusts server-supplied Domain attributes in HTTP Set-Cookie response headers without confirming that the domain matches the origin host. A malicious server can leverage this to register unauthorized cookies targeting different domains, creating potential session fixation or cookie poisoning vectors.
A medium-severity cross-origin cookie leakage vulnerability exists in the CookieJar client middleware of the http4s library. Due to unanchored substring searches used to determine whether a cookie applies to an outbound request, sensitive cookies (such as session IDs and credentials) can be inadvertently sent to unauthorized domains or paths.
An HTTP Request/Response Smuggling vulnerability (CVE-2026-69216) was identified in the Ember chunked transfer encoding decoder of the http4s Scala library. Due to parser leniency accepting sign prefixes, surrounding whitespace, and missing trailing CRLFs, attackers can bypass proxy security boundaries, poison shared caches, or hijack request queues.
A critical resource exhaustion vulnerability exists in the http4s Ember HTTP/2 server and client implementations. By failing to limit the size or quantity of incoming HTTP/2 CONTINUATION frames, the engine allows unauthenticated remote attackers to exhaust JVM heap memory, causing a complete Denial of Service.