CVE-2026-4080

Easy Cart <= 1.8 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes

Published Jun 2, 2026 CVSS 3.1 · 6.4 Medium EPSS < 1% KEV · Not listed
Description
The Easy Cart plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'add_to_cart' shortcode in all versions up to and including 1.8. This is due to insufficient input sanitization and output escaping on user-supplied shortcode attributes. Specifically, the ectp_add_to_cart() function uses sanitize_text_field() on shortcode attributes like 'itemid', 'product_name', 'product_desc', 'product_qty', and 'price' before inserting them into double-quoted HTML attributes. While sanitize_text_field() strips HTML tags, it does not escape double quote characters, allowing an attacker to break out of the HTML attribute context and inject arbitrary event handlers. 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.

Analysis

AI-generated

Technical impact

The Easy Cart WordPress plugin is vulnerable to stored cross‑site scripting in the 'add_to_cart' shortcode. User input provided in attributes such as itemid, product_name, product_desc, product_qty, and price is sanitized with sanitize_text_field, which removes HTML tags but does not escape double‑quote characters. As these values are inserted directly into double‑quoted HTML attributes, an attacker can inject an arbitrary event‑handler attribute (for example, onmouseover="alert(1)") that will execute whenever the affected page is rendered. The vulnerability does not grant privilege escalation; it is limited to authenticated users with Contributor level or higher who can add or edit content that contains the shortcode. When such a user injects a malicious string, browsers will run the contained JavaScript on every visitor of that page, potentially leading to data theft or account takeover on the victim side.

Affected Systems

This flaw affects all releases of the Easy Cart plugin from the zeshanb vendor up to and including version 1.8. Any WordPress installation that has the plugin deployed and allows authenticated users with Contributor or higher roles to create or edit content containing the 'add_to_cart' shortcode is vulnerable. No specific operating system or PHP version constraints were cited in the advisory.

Risk and Exploitability

The vulnerability has a CVSS score of 6.4, indicating a medium severity. No EPSS score is available, so the exploitation probability is currently unknown. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an authenticated Contributor or higher user to insert malicious text into a shortcode, and a victim to load a stored page that includes the malicious attribute. Attackers with sufficient privileges can embed scripts that run in the context of site visitors.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Easy Cart to a version that removes the insecure handling of shortcode attributes.
  • If an immediate patch is unavailable, limit the use of the 'add_to_cart' shortcode to trusted administrators or remove it from publicly accessible content.
  • Implement web‑application firewall rules that block injection of unescaped quotes or event‑handler attributes within HTML attributes.

Generated by OpenCVE AI on June 2, 2026 at 09:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Wordpress
Wordpress wordpress
Zeshanb
Zeshanb easy Cart
Vendors & Products Wordpress
Wordpress wordpress
Zeshanb
Zeshanb easy Cart
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 Easy Cart plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'add_to_cart' shortcode in all versions up to and including 1.8. This is due to insufficient input sanitization and output escaping on user-supplied shortcode attributes. Specifically, the ectp_add_to_cart() function uses sanitize_text_field() on shortcode attributes like 'itemid', 'product_name', 'product_desc', 'product_qty', and 'price' before inserting them into double-quoted HTML attributes. While sanitize_text_field() strips HTML tags, it does not escape double quote characters, allowing an attacker to break out of the HTML attribute context and inject arbitrary event handlers. 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.
Title Easy Cart <= 1.8 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/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
Jun 2, 2026, 10:45 AM
Reserved
Mar 12, 2026, 8:44 PM
Status
Deferred
Published
Jun 2, 2026, 9:16 AM
Modified
Jul 22, 2026, 7:10 PM