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.
Published: 2026-05-29
Score: 4.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

History

Fri, 29 May 2026 16:00:00 +0000

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

Fri, 29 May 2026 10:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 29 May 2026 03:30:00 +0000

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'}


Subscriptions

Saadiqbal Post Snippets – Custom Wordpress Code Snippets Customizer
Wordpress Wordpress
cve-icon MITRE

Status: PUBLISHED

Assigner: Wordfence

Published:

Updated: 2026-05-29T10:07:55.722Z

Reserved: 2026-04-29T15:15:58.743Z

Link: CVE-2026-7430

cve-icon Vulnrichment

Updated: 2026-05-29T10:07:50.454Z

cve-icon NVD

Status : Deferred

Published: 2026-05-29T04:17:10.563

Modified: 2026-05-29T13:09:05.450

Link: CVE-2026-7430

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-29T15:47:37Z

Weaknesses