Sep 16, 2026·5 min read·118 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-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.
CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.
CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).
CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.
An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.
A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.