Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ CVE-2022-21661: Exposing Database Info via WordPress SQL Injection

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š CVE-2022-21661: Exposing Database Info via WordPress SQL Injection


๐Ÿ’ก Newskategorie: Hacking
๐Ÿ”— Quelle: thezdi.com

In October of this year, we received a report from ngocnb and khuyenn from GiaoHangTietKiem JSC covering a SQL injection vulnerability in WordPress. The bug could allow an attacker to expose data stored in a connected database. This vulnerability was recently addressed as CVE-2022-21661 (ZDI-22-020). This blog covers the root cause of the bug and looks at how the WordPress team chose to address it. First, hereโ€™s a quick video demonstrating the vulnerability:

The Vulnerability

The vulnerability occurs in the WordPress Query (WP_Query) class. The WP_Query object is used to perform custom queries to the WordPress database. This object is used by plugins and themes to create their custom display of posts.ย 

The vulnerability occurs when a plugin uses the vulnerable class. One such plugin is Elementor Custom Skin. For this post, we tested the vulnerability against WordPress version 5.8.1 and Elementor Custom Skin plugin version 3.1.3.

In this plugin, the vulnerable WP_Query class is utilized in the get_document_data method of ajax-pagination.php:

Figure 1- - wordpress/wp-content/plugins/ele-custom-skin/includes/ajax-pagination.php

The get_document_data method is invoked when a request is sent to wp-admin/admin-ajax.php and the action parameter is ecsload. ย 

Figure 2 - wordpress/wp-admin/admin-ajax.php

The admin-ajax.php page checks whether the request was made by an authenticated user. If the request came from a non-authenticated user, admin-ajax.php calls a non-authenticated Ajax action. Here, the request is sent without authentication so that the non-authenticated Ajax action is called, which is wp_ajax_nopriv_ecsload.

Searching for the string โ€œwp_ajax_nopriv_ecsloadโ€ shows that it is a hook name present in the ajax-pagination.php page:

Figure 3 - wordpress/wp-content/plugins/ele-custom-skin/includes/ajax-pagination.php

The wp_ajax_nopriv_ecsload hook name refers to the get_document_data callback function. This means that the do_action method calls the get_document_data method.

The get_document_data method creates a WP_Query object. The initialization of the WP_Query object calls the following get_posts method:

Figure 4 - wordpress/wp-includes/class-wp-query.php

The get_posts method first parses the user-supplied parameters. Next, it calls the get_sql method which eventually calls get_sql_for_clause to create clauses of the SQL statement from the user-supplied data. get_sql_for_clause calls clean_query to validate the user-supplied string. However, the method fails to validate the terms parameter if the taxonomy parameter is empty and the value of the field parameter is the string โ€œterm_taxonomy_idโ€. The value of the terms parameter is later used in the SQL statement.

Figure 5 - wordpress/wp-includes/class-wp-tax-query.php

Note that the sql variable returned by get_sql() is appended to an SQL SELECT statement and assembled using strings returned from the WP_Tax_Query->get_sql() method. Later, in the get_posts method, this query is executed by $wpdb->get_col() method, where an SQL injection condition occurs.

This vulnerability can be exploited to read the WordPress database:

Figure 6 - PoC output

The Patch

The patch to address CVE-2022-21661 adds some additional checks to the terms parameter to help prevent further SQL injections from occurring.

Figure 7 - The clean_query method of wordpress/wp-includes/class-wp-tax-query.php

Conclusion

Active attacks on WordPress sites often focus on optional plugins rather than the core of WordPress itself. That was the case earlier this year when a bug in the Fancy Product Designer plugin was reported as being under active attack. Similarly, a file upload vulnerability in the Contact Form 7 plugin was also detected as being exploited by Trend Micro sensors. In this case, the bug is exposed through plugins, but exists within WordPress itself. While this is a matter of information disclosure rather than code execution, the data exposed could prove valuable for attackers. It would not surprise us to see this bug in active attacks in the near future. We recommend applying the patch or taking other remedial action as soon as possible. Special thanks to ngocnb and khuyenn from GiaoHangTietKiem JSC for reporting this to the ZDI. You can read their analysis of the bug here.

...



๐Ÿ“Œ CVE-2020-8596 | Participants Database Plugin 1.9.5.5 on WordPress participants-database.php ascdesc/list_filter_count/sortBy sql injection


๐Ÿ“ˆ 28.31 Punkte

๐Ÿ“Œ CVE-2015-7876 | Drupal 7 Driver for SQL Server/SQL Azure up to 7.x-1.3 sqlsrv/database.inc escapeLike/db_like sql injection


๐Ÿ“ˆ 23.95 Punkte

๐Ÿ“Œ TalkTalk fined ยฃ100k for exposing personal sensitive info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Magento Marketplace Suffers Data Breach Exposing Users' Account Info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Magento Marketplace Suffers Data Breach Exposing Users' Account Info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Magento Marketplace Suffers Data Breach Exposing Users' Account Info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Slickwraps Data Breach Exposing Financial and Customer Info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Staples discloses data breach exposing customer info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Staples' order tracking system led to exposing customer info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Reverb discloses data breach exposing musicians' personal info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ BlueBleed: Microsoft confirmed data leak exposing customersโ€™ info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Activision confirms data breach exposing employee and game info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Toyota warns customers of data breach exposing personal, financial info


๐Ÿ“ˆ 23.4 Punkte

๐Ÿ“Œ Leafly Cannabis Website Leaked User Info via Exposed Database


๐Ÿ“ˆ 23.19 Punkte

๐Ÿ“Œ How to Create a SQL Database in Azure, Test the Database, configure the server and run a SQL query.


๐Ÿ“ˆ 22.68 Punkte

๐Ÿ“Œ Republican polling firm's database was hacked, exposing donor records


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Misconfigured Django Apps Are Exposing Secret API Keys, Database Passwords


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Cloud Database Removed After Exposing Details on 80 Million US Households


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Deloitte's 'Test your Hacker IQ' site fails itself after exposing database user name, password in config file


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Celebrities Found in Unprotected Real Estate Database Exposing 1.5 Billion Records


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Company Behind Chinese Facial Recognition Leaves Database Unprotected And Exposing 2.5 Million People


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ A researcher said that he found a honda elasticsearch database exposing 40gb of internal system and device data.


๐Ÿ“ˆ 22.01 Punkte

๐Ÿ“Œ Thousands of Organizations Are Exposing Sensitive Data Via Google Groups Lists, Researchers Find


๐Ÿ“ˆ 21.64 Punkte

๐Ÿ“Œ CVE-2023-49764 | Younes JFR. Advanced Database Cleaner Plugin up to 3.1.2 on WordPress sql injection


๐Ÿ“ˆ 20.93 Punkte

๐Ÿ“Œ CVE-2020-21152 | SQL SQL Injection vulnerability in inxedu 2.0.6 /saverolefunction functionIds sql injection


๐Ÿ“ˆ 20.08 Punkte

๐Ÿ“Œ CVE-2016-1437 | Cisco Prime Collaboration Deployment up to 11.5.0 SQL Database sql injection (CSCuy92549 / ID 1036151)


๐Ÿ“ˆ 20 Punkte

๐Ÿ“Œ CVE-2015-10054 | githuis P2Manage PTwoManage/Database.cs Execute sql sql injection


๐Ÿ“ˆ 20 Punkte

๐Ÿ“Œ Loginizer up to 1.6.3 on WordPress SQL Injection loginizer_login_failed/lz_valid_ip sql injection


๐Ÿ“ˆ 19.83 Punkte

๐Ÿ“Œ Advanced Database Cleaner Plugin up to 3.0.1 on WordPress sql injection


๐Ÿ“ˆ 19.74 Punkte

๐Ÿ“Œ Database Hacking, Part 3: Using sqlmap for SQL Injection Against MySQL and WordPress


๐Ÿ“ˆ 19.74 Punkte

๐Ÿ“Œ [webapps] WordPress Plugin Database Backups 1.2.2.6 - 'Database Backup Download' CSRF


๐Ÿ“ˆ 19.66 Punkte

๐Ÿ“Œ #0daytoday #WordPress Database Backups 1.2.2.6 Plugin - (Database Backup Download) CSRF Vulnerabili [#0day #Exploit]


๐Ÿ“ˆ 19.66 Punkte

๐Ÿ“Œ WordPress fixes POP chain exposing websites to RCE attacks


๐Ÿ“ˆ 19.5 Punkte

๐Ÿ“Œ [webapps] - Wordpress Ultimate Product Catalog 3.9.8 - (do_shortcode via ajax) Blind SQL Injection


๐Ÿ“ˆ 19.37 Punkte











matomo