Descrizione
The WPForms (Contact Form by WPForms / wpforms-lite) plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the Multiple Choice field's 'Other' option value on payment forms in all versions up to, and including, 2.0.4 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 privileged user such as an administrator accesses the injected payment entry on the WPForms > Payments details page. The submitted value is stored via sanitize_text_field(), which preserves a space-separated pseudo-tag (e.g. '< i class="wpforms-single-payment-tooltip" data-tooltip-content="<img src=x onerror=...>">x< /i>') because strip_tags() ignores a '<' followed by whitespace; on the admin Payments entry page the value is output through wp_kses() with the 'post' allowlist, which normalizes it into a live <i> element retaining its class and data-* attributes, and the bundled Tooltipster initialization (contentAsHTML + contentCloning) then renders the attribute's HTML, executing the script on page load without any hover.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.2, EPSS 0.4% (percentile 28).
Versioni da aggiornare
- smub WPForms – AI Form Builder for WordPress – Contact Forms, Payment Forms, Survey Form, Quiz & More: vulnerabili le versioni fino alla
2.0.4inclusa → aggiornare a una release successiva alla2.0.4.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Applicare una Content-Security-Policy restrittiva e regole WAF contro XSS; invitare gli utenti a non aprire link sospetti verso l'applicazione.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| smub | WPForms – AI Form Builder for WordPress – Contact Forms, Payment Forms, Survey Form, Quiz & More | ≤ 2.0.4 | — |
Riferimenti
- Riferimentohttps://plugins.trac.wordpress.org/browser/wpforms-lite/tags/2.0.2.2/includes/fields/class-radio.php#L771
- Riferimentohttps://plugins.trac.wordpress.org/browser/wpforms-lite/tags/2.0.2.2/includes/fields/class-radio.php#L845
- Riferimentohttps://plugins.trac.wordpress.org/browser/wpforms-lite/tags/2.0.2.2/includes/fields/class-radio.php#L896
- Riferimentohttps://plugins.trac.wordpress.org/browser/wpforms-lite/tags/2.0.2.2/src/Admin/Payments/Views/Single.php#L1019
- Riferimentohttps://plugins.trac.wordpress.org/browser/wpforms-lite/tags/2.0.2.2/templates/admin/payments/single/field.php#L23
- Riferimentohttps://plugins.trac.wordpress.org/changeset/3811507/wpforms-lite/trunk/includes/fields/class-radio.php
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/778cae4c-f864-4f84-9f6a-3ebe0dadec36?source=cve