CVE-2026-7430

Post Snippets <= 4.0.19 - Authenticated (Administrator+) Stored Cross-Site Scripting via Import

2026-05-28 13:41
a1batr0ss

Strategic Overview

Status
Patched in 4.1.1
Affected Version
<= 4.0.19
CVSS
4.4Medium
Weakness type
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE
CVE-2026-7430
View all Post Snippets – Custom WordPress Code Snippets Customizer vulnerabilities

At a glance

CVE-2026-7430 is a medium-severity Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in the Post Snippets WordPress plugin, affecting versions <= 4.0.19. It carries a CVSS score of 4.4 (reachable over the network). Exploitation requires an authenticated account at Administrator level or above. The issue is fixed in version 4.1.1; sites on affected versions should update now. Disclosed May 2026, reported by a1batr0ss.

Vulnerability Overview

The Post Snippets plugin for WordPress is vulnerable to Stored Cross-Site Scripting in all versions up to, and including, 4.0.19. This is due to insufficient output escaping of imported snippet content when rendering JavaScript variables in the post editor. Specifically, the `jqueryUiDialog()` method in `WPEditor.php` embeds snippet content directly into JavaScript string literals without escaping double quotes (the quote-escaping code on line 214 is commented out). When snippets are imported via the Import/Export feature, the content bypasses WordPress's `wp_magic_quotes()` (which would otherwise add protective backslashes), allowing double quotes in snippet content to break out of the JavaScript string context. This makes it possible for authenticated attackers, with Administrator-level access and above, to inject arbitrary web scripts via a malicious import file that execute whenever any administrator accesses a post editor page. Please note that this does not affect single-site installations as administrators already have the `unfiltered_html` capability.

Technical Analysis

The vector marks this flaw as remotely reachable over the network, and no interaction from a victim user.

CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Post Snippets <= 4.0.19 carries this weakness at jqueryUiDialog(), and reaching it takes an account at Administrator level or above. Cross-site scripting happens when input from a request is written into a page without being escaped for the context it lands in, so the browser parses attacker-supplied text as markup or script.

Injected script runs with the privileges of whoever views the affected page, which is how these flaws turn into administrator session theft, silent account creation or persistent backdoors in page content. For Post Snippets the fix is 4.1.1: builds <= 4.0.19 are affected, anything from 4.1.1 onward is not.

Remediation

Update to version 4.1.1, or a newer patched version

How does WordSec protect against this?

An attacker needs Administrator access first, so the firewall sees the attempt as traffic from a logged-in account: WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: Post Snippets 4.1.1 closes this, and updating the plugin is the step that ends it.

  • Firewall
  • Alerts

External References

Related records

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C