Hacking

RCE in WordPress plugin Essential Addons for Elementor impacts hundreds of thousands of websites

Essential Addons for Elementor is a popular WordPress plugin used in over a million sites that provides easy-to-use and creative elements to improve the appearance of the pages.

The plugin is affected by a critical remote code execution (RCE) vulnerability that impacts version 5.0.4 and older.

An unauthenticated user can exploit the vulnerability to perform a local file inclusion attack, such as a PHP file, to remotely gain code execution on sites running a vulnerable version of the plugin.

“This attack can be used to include local files on the filesystem of the website, such as /etc/passwd. This can also be used to perform RCE by including a file with malicious PHP code that normally cannot be executed.” reads the analysis published by PatchStack. “The local file inclusion vulnerability exists due to the way user input data is used inside of PHP’s include function that are part of the ajax_load_more and ajax_eael_product_gallery functions.”

The vulnerability was discovered by Wai Yan Myo Thet, the flaw can be exploited only if websites have the “dynamic gallery” and “product gallery” widgets enabled so that a none token check is present.

Initially, the development team attempted to fix the flaw by implementing a “sanitize_text_field” function on the user input data. However, experts discovered that it was still possible the inclusion of local payloads, then a second patch was applied to version 5.0.4. The new patch invokes the WordPress sanitize file_name function. The function removes special characters that are not admitted in filenames, such as dots and slashes, in order to prevent local file inclusion attacks. Unfortunately, this version was still vulnerable and requested an additional review.

“The third patch was applied to version 5.0.5 of the plugin which can be seen below. This adds more security by making use of PHP’s realpath function. This function returns the canonicalized absolute pathname by expanding all symbolic links and resolves references to ., ../, etc. in the input path.” continues the analysis.

Version 5.0.5 was released on January 28, 2022, and at the time of this writing, it was installed only on 380,000 WordPress websites, this means that more than 600K sites are still using a potentially vulnerable version.

Below is the timeline for this vulnerability:

  • 25-01-2022 – We discovered the vulnerability in Essential Addons for Elementor and released a virtual patch to all Patchstack paid version customers.
  • 25-01-2022 – We reached out to the developer of the plugin. The issue was known to them as it was reported to them already. We made the comment that their current patch is insufficient.
  • 28-01-2022 – The developer released version 5.0.5 which contains a sufficient patch.
  • 31-01-2022– Added the vulnerability to the Patchstack vulnerability database.
  • 31-01-2022 – Published the article.

Follow me on Twitter: @securityaffairs and Facebook

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, WordPress)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Nova Scotia Power discloses data breach after March security incident

Nova Scotia Power confirmed a data breach involving the theft of sensitive customer data after…

3 hours ago

Coinbase disclosed a data breach after an extortion attempt

Coinbase confirmed rogue contractors stole customer data and demanded a $20M ransom in a breach…

5 hours ago

U.S. CISA adds a Fortinet flaw to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds a Fortinet vulnerability to its Known Exploited Vulnerabilities…

14 hours ago

Kosovo authorities extradited admin of the cybercrime marketplace BlackDB.cc

Kosovar citizen extradited to the US for running the cybercrime marketplace BlackDB.cc appeared in federal…

16 hours ago

U.S. CISA adds Microsoft Windows flaws to its Known Exploited Vulnerabilities catalog

U.S. Cybersecurity and Infrastructure Security Agency (CISA) adds Microsoft Windows flaws to its Known Exploited…

1 day ago

Ivanti fixed two EPMM flaws exploited in limited attacks

Ivanti addressed two Endpoint Manager Mobile (EPMM) software vulnerabilities that have been exploited in limited…

1 day ago