# Free Gifts for WooCommerce <= 4.5 - Unauthenticated Arbitrary Shortcode Execution via Gift Popup AJAX Handler

- **ID:** WPSEC-2026-2045
- **Plugin:** GIFTiT – Free Gifts for WooCommerce (`ithemeland-free-gifts-for-woo`), https://wordpress.org/plugins/ithemeland-free-gifts-for-woo/
- **Affected versions:** all versions before 4.6
- **Fixed in:** 4.6 (Update to 4.6 or later.)
- **Severity:** High 7.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L)
- **Weakness:** CWE-94
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-30)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/ithemeland-free-gifts-for-woo
- **Fix released:** 2026-10-29
- **Published:** 2026-10-30
- **URL:** https://wpsec.com/vuln/WPSEC-2026-2045/

## Description

The Free Gifts for WooCommerce plugin for WordPress is vulnerable to arbitrary shortcode execution via the gift popup AJAX handler in all versions up to, and including, 4.5. This is due to the plugin inserting the user-supplied 'type' POST parameter, sanitized only with sanitize_text_field, into a shortcode string that is then passed to do_shortcode. This allows the attribute to be closed and further shortcodes to be appended. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes registered on the site.

## References

- https://wpsec.com/vuln/WPSEC-2026-2045/
- https://plugins.svn.wordpress.org/ithemeland-free-gifts-for-woo/tags/4.6/
- https://wordpress.org/plugins/ithemeland-free-gifts-for-woo/

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

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.
