CVE-2026-3998
Received Received - Intake
Stored XSS in WM JqMath WordPress Plugin via Style Attribute

Publication date: 2026-04-15

Last updated on: 2026-04-15

Assigner: Wordfence

Description
The WM JqMath plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'style' shortcode attribute of the [jqmath] shortcode in all versions up to and including 1.3. This is due to insufficient input sanitization and output escaping on user-supplied shortcode attributes. The generate_jqMathFormula() function directly concatenates the 'style' attribute value into an HTML style attribute without applying esc_attr() or any other escaping. This makes it possible for authenticated attackers, with Contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-15
Last Modified
2026-04-15
Generated
2026-05-07
AI Q&A
2026-04-15
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
wm_jqmath jqmath to 1.3 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The WM JqMath plugin for WordPress has a Stored Cross-Site Scripting (XSS) vulnerability in its [jqmath] shortcode, specifically in the 'style' attribute. This happens because the plugin does not properly sanitize or escape user input for this attribute. The function generate_jqMathFormula() directly inserts the 'style' attribute value into an HTML style attribute without using proper escaping functions like esc_attr().

As a result, an authenticated attacker with Contributor-level access or higher can inject malicious scripts into pages. These scripts will execute whenever any user views the infected page.


How can this vulnerability impact me? :

This vulnerability allows attackers with Contributor-level access or above to inject arbitrary malicious scripts into WordPress pages. When other users visit these pages, the injected scripts execute in their browsers.

  • It can lead to theft of user credentials or session tokens.
  • It can enable unauthorized actions on behalf of users.
  • It can compromise the integrity and trustworthiness of the website.

What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, you should update the WM JqMath plugin for WordPress to a version later than 1.3 where the issue is fixed.

If an update is not immediately available, restrict Contributor-level and higher user access to trusted users only, as the vulnerability requires authenticated users with Contributor-level access or above to exploit.

Additionally, consider applying input sanitization and output escaping on the 'style' shortcode attribute in the plugin code, such as using esc_attr() to prevent script injection.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability involves Stored Cross-Site Scripting (XSS) via the 'style' shortcode attribute in the WM JqMath WordPress plugin. Detection typically involves scanning WordPress sites for the presence of the vulnerable plugin version (up to 1.3) and inspecting pages or posts for injected malicious scripts within the 'style' attribute of the [jqmath] shortcode.

Since the vulnerability requires Contributor-level access or higher to inject scripts, monitoring user inputs and changes to posts containing the [jqmath] shortcode can help detect exploitation.

Suggested commands or approaches include:

  • Use WP-CLI to list installed plugins and their versions: `wp plugin list`
  • Search the WordPress database for posts containing the [jqmath] shortcode with suspicious 'style' attributes, for example using SQL: `SELECT ID, post_content FROM wp_posts WHERE post_content LIKE '%[jqmath%style=%';`
  • Use grep or similar tools on exported content or backups to find occurrences of the shortcode with suspicious style attributes: `grep -r '\[jqmath.*style=' /path/to/wordpress/wp-content/uploads/`
  • Monitor HTTP traffic or logs for unusual script execution or alerts triggered by XSS payloads in pages containing the shortcode.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart