CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-60137

CVE-2026-60137: SQL Injection in WordPress Core WP_Query Class via author__not_in Parameter

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 16, 2026·5 min read·118 visits

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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.

Code Analysis

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.

Exploitation & Attack Chain (wp2shell)

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.

Impact Assessment

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.

Remediation & Mitigation

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:

  • Release Line 6.8.x: Upgrade to 6.8.6 or newer
  • Release Line 6.9.x: Upgrade to 6.9.5 or newer
  • Release Line 7.0.x: Upgrade to 7.0.2 or newer

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.

Official Patches

WordPressWordPress 7.0.2 Release Notes
WordPressWordPress Develop Security Advisory (GHSA-fpp7-x2x2-2mjf)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
78.31%
Top 0% most exploited
125,000
via Shodan

Affected Systems

WordPress Core 6.8.0 through 6.8.5WordPress Core 6.9.0 through 6.9.4WordPress Core 7.0.0 through 7.0.1

Affected Versions Detail

Product
Affected Versions
Fixed Version
WordPress Core
WordPress
>= 6.8.0, < 6.8.66.8.6
WordPress Core
WordPress
>= 6.9.0, < 6.9.56.9.5
WordPress Core
WordPress
>= 7.0.0, < 7.0.27.0.2
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork
CVSS Base Score5.9 (Standalone) / 9.8 (Chained)
Exploit Statusactive
CISA KEV StatusListed
EPSS Score0.78305

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059Command and Scripting Interpreter
Execution
T1505.003Server Software Component: Web Shell
Persistence
T1110Brute Force / Credential Extraction
Credential Access
CWE-89
Improper Sanitization of Special Elements used in an SQL Command ('SQL Injection')

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.

Known Exploits & Detection

wp2shell-PoC by sowarmaUnauthenticated RCE exploit chain combining REST API batch route confusion with the SQLi.
wp2shell-poc by Icex0Full RCE chain demonstrating the unauthenticated exploitation mechanism.
wp2shell by 0xshaUnauthenticated RCE toolkit for testing and demonstrating vulnerability on vulnerable installations.
wp2shell-scanner by ZephrFishMass scanner specifically engineered to locate vulnerable REST batch route handlers and underlying SQLi states.
wp2shell-lab by dinosnDocker-based local reproduction lab environment and safe detection script for WordPress 6.9.0-6.9.4 and 7.0.0-7.0.1.
WordPresShell by securelayer7Educational exploit proof-of-concept for internal corporate testing.
NucleiDetection Template Available

Vulnerability Timeline

WordPress Security Advisory published alongside security releases
2026-07-17
CISA adds CVE-2026-60137 to Known Exploited Vulnerabilities Catalog
2026-07-21
Remediation due date under Binding Operational Directive
2026-08-04

References & Sources

  • [1]WordPress Core Advisory (GHSA-fpp7-x2x2-2mjf)
  • [2]WordPress 7.0.2 Security Release
  • [3]CISA KEV Catalog Reference
  • [4]Searchlight Cyber Research on wp2shell
  • [5]Aikido Security Blog Analysis
Related Vulnerabilities
CVE-2026-63030

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-118777
4.8

CVE-2026-118777: Prototype Pollution in Forge HTTP Client Cookie Management

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.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 2 hours ago•CVE-2026-118775
3.7

CVE-2026-118775: ASN.1 OID First Arc Truncation and Ambiguity in node-forge

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.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 3 hours ago•CVE-2026-119194
7.5

CVE-2026-119194: Algorithmic Complexity Denial of Service in pyasn1 Schemaless ASN.1 Decoder

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).

Alon Barad
Alon Barad
5 views•9 min read
•about 4 hours ago•CVE-2026-119195
7.5

CVE-2026-119195: Quadratic-Time Denial of Service in pyasn1 BER/CER/DER Decoders

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.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 5 hours ago•CVE-2026-119197
7.5

CVE-2026-119197: Quadratic Algorithmic Complexity Denial of Service in pyasn1 REAL Mantissa Decoder

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.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 6 hours ago•CVE-2026-119196
7.5

CVE-2026-119196: Quadratic CPU Consumption in pyasn1 Constructed BIT STRING Decoding

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.

Alon Barad
Alon Barad
6 views•10 min read