Articles · Security research

CVE-2026-111835: Unauthenticated Payment Credential Overwrite in Swish for WooCommerce <= 3.7.8

· Alpaslan Fatih Sözer, attorney at law, Denizli Bar Association

Advisory summary. BjornTech Swish for WooCommerce versions <= 3.7.8 contained an unauthenticated Broken Access Control vulnerability in its OAuth callback endpoint, allowing an attacker to overwrite the store's stored Swish refresh token. The issue is tracked as CVE-2026-111835 and fixed in version 3.7.9 (released 18 October 2026).

  • Product: BjornTech Swish for WooCommerce (WordPress plugin, slug woo-swish-e-commerce)
  • Affected / Patched: <= 3.7.8 / Fixed in 3.7.9
  • Classification: CWE-862 (Missing Authorization) · CVSS 3.1: 6.5 (Medium) (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N)
  • Credit: Alpaslan Fatih Sözer (reported via Patchstack Bug Bounty Program)

BjornTech's Swish for WooCommerce plugin connects WooCommerce stores to Swish payments via an intermediary service that authenticates requests using a stored refresh token. While reviewing the plugin's connection callback flow in a local isolated test installation in October 2026, I found that the public callback endpoint relied on PHP loose comparison (==) against JSON-decoded user input.

Root cause

The plugin registers a public WooCommerce API callback at /?wc-api=swish_admin that accepts a JSON request body and saves the supplied refresh_token into store options after checking two fields (nonce and uuid):

// classes/woo-swish-payment-gateway.php (3.7.8)
$body  = json_decode( file_get_contents( "php://input" ) );
$nonce = get_site_transient( 'handle_swish_account' );   // returns false when no flow is active

if ( $body->nonce == $nonce ) {
    if ( $body->uuid == $this->account_uuid ) {
        $this->refresh_token = $body->refresh_token;
        $this->update_option( 'swish_refresh_token', $this->refresh_token );
        delete_site_transient( 'swish_access_token' );
        ...

Because the payload is decoded from JSON, the caller controls the data types of nonce and uuid, and PHP's loose equality operator (==) performs type juggling across mismatched types. This created two distinct bypass paths:

  • No active connection flow: Outside an active onboarding session, get_site_transient( 'handle_swish_account' ) returns false. Omitting nonce yields null == false, which evaluates to true.
  • Already connected stores: Even when both the stored transient and account_uuid held non-empty secret strings, sending JSON boolean true bypassed both checks because in PHP true == "<any non-empty string>" evaluates to true:
var_dump( true == "9f8e7d6c5b" );                             // bool(true)
var_dump( true == "a1b2c3d4-e5f6-7890-abcd-ef1234567890" );   // bool(true)

Consequently, a single unauthenticated POST request containing {"nonce": true, "uuid": true, "refresh_token": "..."} passed both checks without knowledge of any secret value, overwrote swish_refresh_token, and deleted the cached swish_access_token.

Scope and impact boundaries

  • Observed impact: An unauthenticated remote request replaced the store's stored Swish refresh token and cleared the cached access token while the WordPress admin screen continued to display the connection as configured (because the settings check only verified that a token string was present).
  • Testing boundary: Testing was carried out strictly on an offline local installation with outbound requests disabled. No claims are made regarding downstream payment-service behavior beyond the verified local credential overwrite.

Vendor fix (version 3.7.9)

In version 3.7.9, BjornTech refactored the OAuth connection flow into classes/woo-swish-oauth-connection.php and enforced strict type validation, pending-state expiration, strict UUID comparison, and constant-time nonce verification:

// classes/woo-swish-oauth-connection.php (3.7.9)
if ( ! is_object( $body ) || ! self::nonempty_string( $body->nonce ?? null )
    || ! self::nonempty_string( $body->uuid ?? null ) || ! self::nonempty_string( $body->refresh_token ?? null ) ) {
    return false;
}
...
if ( ( $settings['connection_type'] ?? '' ) !== '_service'
    || ! is_array( $pending ) || ! self::nonempty_string( $pending['nonce'] ?? null )
    || ! is_int( $pending['expires'] ?? null ) || $pending['expires'] <= time()
    || ! self::nonempty_string( $uuid ) || $body->uuid !== $uuid || ( $pending['uuid'] ?? null ) !== $uuid
    || ! hash_equals( $pending['nonce'], $body->nonce ) ) {
    return false;
}

Version 3.7.9 also added an explicit capability check (current_user_can( 'manage_woocommerce' )) to the administrative initiation endpoint and clears the pending nonce after completion.

Remediation

  • Update BjornTech Swish for WooCommerce to version 3.7.9 or later.
  • Disconnect and reconnect the Swish service integration after updating to ensure the stored refresh token belongs to the store.
  • Review payment logs for unexplained Swish connection or settlement failures prior to patching.

Disclosure timeline

  • 11 October 2026: Vulnerability verified locally and reported via Patchstack.
  • 12 October 2026: Validated by Patchstack and forwarded to the vendor.
  • 18 October 2026: Vendor released Swish for WooCommerce 3.7.9.
  • 21 October 2026: CVE-2026-111835 published in the CVE List and Patchstack Vulnerability Database.

For the full Turkish technical and legal analysis, see the Turkish write-up. Related advisories: CVE-2026-48201 (Fast Velocity Minify) and CVE-2026-110900 (BookIt). For Turkish data protection and cybersecurity legal guidance, see IT law, cybersecurity and KVKK in Türkiye.

References

Published 21 November 2026 after coordinated disclosure and patch release (3.7.9).