CVE-2026-40732

Notification for Telegram <= 3.5 - Unauthenticated Stored Cross-Site Scripting

highImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
7.2
CVSS Score
7.2
CVSS Score
high
Severity
3.5.1
Patched in
11d
Time to patch

Description

The Notification for Telegram plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 3.5 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=3.5
PublishedApril 20, 2026
Last updatedApril 30, 2026

What Changed in the Fix

Changes introduced in v3.5.1

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

# Research Plan: CVE-2026-40732 - Notification for Telegram Unauthenticated Stored XSS ## 1. Vulnerability Summary The **Notification for Telegram** plugin (up to version 3.5) is vulnerable to unauthenticated stored cross-site scripting (XSS). The vulnerability stems from the plugin's failure to pr…

Show full research plan

Research Plan: CVE-2026-40732 - Notification for Telegram Unauthenticated Stored XSS

1. Vulnerability Summary

The Notification for Telegram plugin (up to version 3.5) is vulnerable to unauthenticated stored cross-site scripting (XSS). The vulnerability stems from the plugin's failure to properly sanitize and escape user-supplied data collected during the WooCommerce checkout process and subsequently displayed in the WordPress administrative interface. Specifically, the nftb_telegramnickname field is saved via update_post_meta without sufficient sanitization to prevent attribute injection, and then echoed directly in the admin order details page without any output escaping.

2. Attack Vector Analysis

  • Endpoint: WooCommerce Checkout (POST /?wc-ajax=checkout)
  • Vulnerable Parameter: nftb_telegramnickname
  • Authentication: None (Unauthenticated)
  • Preconditions:
    1. WooCommerce must be installed and active.
    2. The plugin must be active.
    3. (Optional for injection, required for visibility) The "Telegram Nickname" field is usually enabled via the notify_woocomerce_checkoutfield option, but the saving logic in nftb_update_order_meta runs on the woocommerce_checkout_update_order_meta hook regardless of the setting's state.

3. Code Flow

  1. Entry Point (Input): During a WooCommerce checkout, the `nftb_update
Research Findings
Static analysis — not yet PoC-verified

Summary

The Notification for Telegram plugin for WordPress is vulnerable to unauthenticated stored cross-site scripting due to insufficient input sanitization and output escaping of the 'nftb_telegramnickname' field. Attackers can inject arbitrary web scripts during the WooCommerce checkout process, which are then executed in the context of an administrator viewing the order details.

Vulnerable Code

// include/tnfunction.php line 201
function nftb_update_order_meta( $order_id ) {
    if ( ! empty( $_POST['nftb_telegramnickname'] ) ) {
        update_post_meta( $order_id, 'Telegram', sanitize_text_field( $_POST['nftb_telegramnickname'] ) );
    }
}

---

// include/tnfunction.php line 212
function nftb__field_display_admin_order_meta($order){

$tlgruser = get_post_meta( $order->id, 'Telegram', true );
 if ( ! empty( $tlgruser ) ) {
        echo '<p><strong>'.__('Telegram').':</strong> <a href="https://t.me/'.$tlgruser.'">' .$tlgruser  . '</a></p>';
    }
}

Security Fix

--- include/tnfunction.php
+++ include/tnfunction.php
@@ -211,6 +211,6 @@
 function nftb__field_display_admin_order_meta($order){
 $tlgruser = get_post_meta( $order->id, 'Telegram', true );
  if ( ! empty( $tlgruser ) ) {
-        echo '<p><strong>'.__('Telegram').':</strong> <a href="https://t.me/'.$tlgruser.'">' .$tlgruser  . '</a></p>';
+        echo '<p><strong>' . esc_html__( 'Telegram', 'notification-for-telegram' ) . ':</strong> <a href="' . esc_url( 'https://t.me/' . $tlgruser ) . '">' . esc_html( $tlgruser ) . '</a></p>';
     }
 }

Exploit Outline

1. Access a site running WooCommerce and the Notification for Telegram plugin (<= 3.5). 2. Add an item to the cart and proceed to the checkout page. 3. Locate the 'Telegram Nickname' field (parameter `nftb_telegramnickname`). 4. Submit an order, providing a malicious payload in this field, such as: `"><script>alert(document.cookie)</script>` or `" onmouseover="alert(1)`. 5. Wait for a site administrator to view the order details page in the WordPress dashboard (`/wp-admin/post.php?post=[ORDER_ID]&action=edit`). 6. The script will execute in the administrator's session because the plugin echoes the stored meta value directly into the HTML without escaping.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.