CVE-2026-7430

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

Published May 29, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The Post Snippets plugin allows a malicious import file to embed JavaScript code directly into the post editor when the import feature is used. Because the plugin fails to properly escape double quotes in the snippet content, the payload can break out of its JavaScript string context and execute in the browser of any administrator who opens the editor. This represents a stored cross‑site scripting flaw (CWE‑79).

Affected Systems

All installations of the Post Snippets plugin with versions 4.0.19 and earlier are affected. The vendor is saadiqbal:Post Snippets – Custom WordPress Code Snippets Customizer. WordPress single‑site administrators are not impacted because they already possess the unfiltered_html capability, which mitigates the issue in that context.

Risk and Exploitability

The CVSS score of 4.4 indicates moderate severity, and while the EPSS score is not available, the flaw requires an authenticated administrator and is not listed in the CISA KEV catalog. An attacker can upload a crafted import file from an account with Administrator privileges or higher and then rely on any subsequent access to the post editor by an administrator to trigger the embedded script. The risk is therefore moderate to high within environments where administrators perform regular editor use.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Post Snippets to a version newer than 4.0.19 (for example 4.1.1) where the import process properly escapes snippet content.
  • If an upgrade cannot be performed immediately, disable or restrict the Import/Export feature so that only trusted administrators can use it, or remove the feature entirely from the plugin temporarily.
  • Verify any already‑imported snippets for special characters and sanitize their content, ensuring no double quotes or unescaped characters remain in the database.

Generated by OpenCVE AI on May 29, 2026 at 04:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Saadiqbal
Saadiqbal post Snippets – Custom Wordpress Code Snippets Customizer
Wordpress
Wordpress wordpress
Vendors & Products Saadiqbal
Saadiqbal post Snippets – Custom Wordpress Code Snippets Customizer
Wordpress
Wordpress wordpress
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Post Snippets <= 4.0.19 - Authenticated (Administrator+) Stored Cross-Site Scripting via Import
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
Wordfence
Published
Updated
May 29, 2026, 10:07 AM
Reserved
Apr 29, 2026, 3:15 PM
Status
Deferred
Published
May 29, 2026, 4:17 AM
Modified
Jul 21, 2026, 12:10 PM