WPC AJAX Add to Cart for WooCommerce <= 2.2.7 - Unauthenticated Improper Input Validation to Cart and Order Item Meta Injection via 'variation' Parameter

Medium 5.3 CWE-20Fixed in 2.2.8
ID
WPSEC-2026-4266
Plugin
WPC AJAX Add to Cart for WooCommerce (wpc-ajax-add-to-cart)
Affected
from 1.3.9 before 2.2.8
Remediation
Update to 2.2.8 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-20
Usage
Plugin Low · Affected versions Low among sites WPSec scans, 2026-11-30
Attack surface
WPC AJAX Add to Cart for WooCommerce on WPSec AttackSurface
Fix released
Published

Description

The WPC AJAX Add to Cart for WooCommerce plugin for WordPress is vulnerable to Improper Input Validation via the 'variation' parameter of the public AJAX add-to-cart handler (wc-ajax=wooaa_add_to_cart) in all versions up to, and including, 2.2.7. This is due to the handler accepting arbitrary attribute keys and values from the request and passing them to the cart for any product type, not only for variable products, without checking them against the attributes the product defines. WooCommerce validates this data only for variations, so on simple products the values are stored in the cart item and copied into order item meta at checkout. This makes it possible for unauthenticated attackers to attach arbitrary plain-text meta to the line items of orders they place, including underscore-prefixed meta keys that WooCommerce uses internally, such as its stock-tracking keys. This can stop stock from being reduced for the purchased items, or inflate stock levels when the order is later cancelled or fails.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON, OSV or Markdown · All advisories: JSON, OSV, RSS

License: CC BY 4.0