Commit 35432d9029 for wordpress.org
commit 35432d902965706b3091bf90a39ecfb0ad31427d
Author: johnbillion <johnbillion@git.wordpress.org>
Date: Wed Nov 18 13:22:50 2026 +0000
XML-RPC: Process only one pingback per request.
Props johnbillion, batmoo, jonsurrell, jeremyfelt, jorbin, xknown, rfaile313.
Built from https://develop.svn.wordpress.org/trunk@65579
git-svn-id: http://core.svn.wordpress.org/trunk@64652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php
index 3a4db2f5f1..515a2458f9 100644
--- a/wp-includes/class-wp-xmlrpc-server.php
+++ b/wp-includes/class-wp-xmlrpc-server.php
@@ -50,6 +50,17 @@ class wp_xmlrpc_server extends IXR_Server {
*/
protected $auth_failed = false;
+ /**
+ * Flags that a pingback has already been processed in this instance of wp_xmlrpc_server.
+ *
+ * Prevents a single `system.multicall` request from processing an unbounded number of pingbacks.
+ *
+ * @since 7.1.5
+ *
+ * @var bool
+ */
+ protected $pingback_processed = false;
+
/**
* Flags that XML-RPC is enabled
*
@@ -7097,6 +7108,16 @@ class wp_xmlrpc_server extends IXR_Server {
public function pingback_ping( $args ) {
global $wpdb;
+ /*
+ * Checked before the `xmlrpc_call` action and any database or network work, so repeated
+ * calls in a multicall cost nothing, including in plugins that check each pingback.
+ */
+ if ( $this->pingback_processed ) {
+ return $this->pingback_error( 49, __( 'Only one pingback can be processed per request.' ) );
+ }
+
+ $this->pingback_processed = true;
+
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action( 'xmlrpc_call', 'pingback.ping', $args, $this );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 5c3eb20d5c..cd4fe28e87 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-RC1-65578';
+$wp_version = '7.2-RC1-65579';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.