# Modern Cart <= 1.1.2 - Unauthenticated Improper Input Validation via Slide-Out Add-to-Cart Attributes

- **ID:** WPSEC-2026-4362
- **Plugin:** Modern Cart – WooCommerce Side Cart & Popup Cart (`modern-cart`), https://wordpress.org/plugins/modern-cart/
- **Affected versions:** all versions before 1.1.3
- **Fixed in:** 1.1.3 (Update to 1.1.3 or later.)
- **Severity:** Medium 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N)
- **Weakness:** CWE-20
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-12-02)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/modern-cart
- **Fix released:** 2026-12-01
- **Published:** 2026-12-02
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4362/

## Description

The Modern Cart plugin for WordPress is vulnerable to Improper Input Validation via the 'attributes' parameter of the moderncart_add_to_cart AJAX action in all versions up to, and including, 1.1.2. This is due to the handler passing any posted attribute keys and values to WC_Cart::add_to_cart() without checking that the product is a variation or that the values belong to the parent product's variation attributes. This makes it possible for unauthenticated attackers to add arbitrary key/value pairs to their cart items, which WooCommerce saves as order line item meta at checkout. This includes underscore-prefixed meta that WooCommerce reads internally, such as _reduced_stock, which stops stock from being reduced for that line item. On older WooCommerce versions, it also makes it possible to add variable products without a valid variation, or with attribute values the variation does not allow.

## References

- https://wpsec.com/vuln/WPSEC-2026-4362/
- https://plugins.svn.wordpress.org/modern-cart/tags/1.1.3/
- https://wordpress.org/plugins/modern-cart/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4362/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
