GiveWP <= 4.17.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via givewp_campaign_grid Shortcode Attributes
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's givewp_campaign_grid shortcode in versions up to, and including, 4.17.0 This is due to insufficient input sanitization and output escaping on user supplied shortcode attributes (filter_by, layout, sort_by, order_by) in the CampaignGridShortcode::parseAttributes() function combined with the render template emitting json_encode($attributes) inside a single-quoted HTML attribute without esc_attr() — json_encode() does not escape single quotes by default, so a ' in an attribute value breaks out of the enclosing attribute. 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.
Text from CVE List
Affected versions 1
- GiveWP – Donation Plugin and Fundraising Platformaffected: all versions through 4.17.0CVE List
References 7
- github.com/impress-org/givewp/releases/tag/4.18.0Fixvia CVE List
- wordfence.com/threat-intel/vulnerabilities/id/cc825b2f-43d0-42f0-972d-7d361f7e0b59?source=cveReferencevia CVE List
- plugins.trac.wordpress.org/browser/give/tags/4.17.0/src/Campaigns/Blocks/CampaignGrid/render.php#L6Referencevia CVE List
- plugins.trac.wordpress.org/browser/give/tags/4.17.0/src/Campaigns/Shortcodes/CampaignGridShortcode.php#L91Referencevia CVE List
- plugins.trac.wordpress.org/browser/give/tags/4.17.0/src/Campaigns/Shortcodes/CampaignGridShortcode.php#L22Referencevia CVE List
- plugins.trac.wordpress.org/browser/give/tags/4.17.0/src/Campaigns/Shortcodes/ShortcodeRenderController.php#L65Referencevia CVE List
- plugins.trac.wordpress.org/browser/give/tags/4.17.0/src/Campaigns/Actions/RegisterCampaignShortcodes.php#L28Referencevia CVE List