Mail Mint <= 1.31.4 - Authenticated (Custom+) SQL Injection via 'filters' Parameter
What fixes it
No source in this snapshot names a fixed version.
Description
The Mail Mint plugin for WordPress is vulnerable to SQL Injection via the 'filters' parameter of the /wp-json/mrm/v1/segments/contacts REST endpoint in versions up to, and including, 1.31.4 This is due to insufficient escaping on the user supplied filter 'value' before it is appended to a SQL query in SegmentFilterService::get_meta_join_query() at line 797, where the value is string-interpolated into the WHERE fragment in a numeric (unquoted) context and the surrounding $wpdb->prepare() calls do not cover the injected value. This makes it possible for authenticated attackers, with the custom 'mint_read_contacts' capability (granted to Administrators by default, and configurable to lower roles via the plugin's role manager), to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Text from CVE List
Affected versions 1
- Mail Mint – Email Marketing, Automation & WooCommerce Emails with AI Assistanceaffected: all versions through 1.31.4CVE List
References 8
- wordfence.com/threat-intel/vulnerabilities/id/7c492357-3293-49cf-9e4a-3e144b58b6f7?source=cveReferencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/Internal/Admin/Segmentation/SegmentFilterService.php#L797Referencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/Internal/Admin/Segmentation/SegmentFilterService.php#L500Referencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/Internal/Admin/Segmentation/SegmentFilterService.php#L100Referencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/API/Controllers/Admin/SegmentController.php#L41Referencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/API/Routes/Admin/SegmentRoute.php#L55Referencevia CVE List
- plugins.trac.wordpress.org/browser/mail-mint/tags/1.31.4/app/Internal/Admin/Segmentation/SegmentFilterService.php#L297Referencevia CVE List
- plugins.trac.wordpress.org/changeset/3743638/mail-mint/trunk/app/Internal/Admin/Segmentation/SegmentFilterService.phpReferencevia CVE List