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·5 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

•16 minutes ago•CVE-2026-61598
7.1

CVE-2026-61598: Remote State Modification via Mass Assignment in djust Framework

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.

Alon Barad
Alon Barad
2 views•6 min read
•about 1 hour ago•CVE-2026-69213
7.5

CVE-2026-69213: Uncontrolled Resource Consumption (DoS) in http4s Ember HTTP/2 Implementation

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.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 2 hours ago•CVE-2026-69214
6.8

CVE-2026-69214: Session Fixation via Arbitrary Set-Cookie Domain Acceptance in http4s CookieJar Middleware

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.

Alon Barad
Alon Barad
4 views•5 min read
•about 3 hours ago•CVE-2026-69215
6.8

CVE-2026-69215: Cross-Origin Cookie Leakage via Improper Domain and Path Matching in http4s CookieJar Client Middleware

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.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 4 hours ago•CVE-2026-69216
5.4

CVE-2026-69216: HTTP Request/Response Smuggling in http4s Ember Parser

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.

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

CVE-2026-69218: Denial of Service via Unbounded HTTP/2 Continuation Frame Buffering in http4s Ember

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.

Amit Schendel
Amit Schendel
3 views•7 min read