Critical flaw in Ninja Forms WordPress Plugin actively exploited in the wild

A critical vulnerability in Ninja Forms plugin potentially impacted more than one million WordPress websites

In middle June, the Wordfence Threat Intelligence team noticed a back-ported security update in the popular WordPress plugin Ninja Forms, which has over one million active installations. The analysis of the updates revealed that they patched a code injection vulnerability that an unauthenticated attacker can exploit to execute arbitrary code or delete arbitrary files on the websites where a separate POP chain was present.

The researchers believe that this vulnerability is being actively exploited in the wild, it has been rated with a CVSS score of 9.8.

Ninja Forms is a drag-and-drop form builder plugin for WordPress builder that allows users to easily create complex forms within just a few minutes.

The vulnerability resides in the Merge Tag feature of the plugin.

“One feature of Ninja Forms is the ability to add “Merge Tags” to forms that will auto-populate values from other areas of WordPress like Post IDs and logged in user’s names. Unfortunately, this functionality had a flaw that made it possible to call various Ninja Form classes that could be used for a wide range of exploits targeting vulnerable WordPress sites.” reads the advisory published by Wordfence. “Without providing too many details on the vulnerability, the Merge Tag functionality does an is_callable() check on a supplied Merge Tags.”When a callable class and method is supplied as a Merge Tag, the function is called and the code executed. These Merge Tags can be supplied by unauthenticated users due to the way NF_MergeTags_Other class handles Merge Tags. We determined that this could lead to a variety of exploit chains due to the various classes and functions that the Ninja Forms plugin contains.”

The experts explained that the issue can be abused for a wide range of exploits.

One of the potentially critical exploit chain described by the researchers involves the use of the NF_Admin_Processes_ImportForm class to achieve remote code execution via deserialization.

“One potentially critical exploit chain in particular involves the use of the NF_Admin_Processes_ImportForm class to achieve remote code execution via deserialization, though there would need to be another plugin or theme installed on the site with a usable gadget.” added the researchers.

The flaw was addressed with the release of Ninja Forms versions 3.0.34.2, 3.1.10, 3.2.28, 3.3.21.4, 3.4.34.2, 3.5.8.4, and 3.6.11.

Security Affairs is one of the finalists for the best European Cybersecurity Blogger Awards 2022 – VOTE FOR YOUR WINNERS. I ask you to vote for me again (even if you have already done it), because this vote is for the final.

Please vote for Security Affairs and Pierluigi Paganini in every category that includes them (e.g. sections “The Underdogs – Best Personal (non-commercial) Security Blog” and “The Tech Whizz – Best Technical Blog”)

To nominate, please visit: 

https://docs.google.com/forms/d/e/1FAIpQLSdNDzjvToMSq36YkIHQWwhma90SR0E9rLndflZ3Cu_gVI2Axw/viewform

Follow me on Twitter: @securityaffairs and Facebook

Pierluigi Paganini

(SecurityAffairs – hacking, WordPress)

The post Critical flaw in Ninja Forms WordPress Plugin actively exploited in the wild appeared first on Security Affairs.

Recent Posts
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt