A WordPress anti-spam plugin with over 60,000 installations covered a PHP Things injection vulnerability that arose from incorrect sanitization of inputs, consequently allowing base64 encoded user input.
Unauthenticated PHP Item Injection
A vulnerability was discovered in the popular Stop Spammers Security|Block Spam Users, Remarks, Types WordPress plugin.
The purpose of the plugin is to stop spam in remarks, types, and sign-up registrations. It can stop spam bots and has the capability for users to input IP addresses to obstruct.
It is a needed practice for any WordPress plugin or form that accepts a user input to just enable specific inputs, like text, images, email addresses, whatever input is anticipated.
Unforeseen inputs need to be filtered out. That filtering process that stays out unwanted inputs is called sanitization.
For example, a contact type need to have a function that inspects what is submitted and block (sterilize) anything that is not text.
The vulnerability found in the anti-spam plugin permitted encoded input (base64 encoded) which can then set off a type of vulnerability called a PHP Object injection vulnerability.
The description of the vulnerability released on the WPScan website explains the concern as:
“The plugin passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are used as second difficulty, which might lead to PHP Object injection if a plugin set up on the blog site has a suitable gizmo chain …”
The category of the vulnerability is Insecure Deserialization.
The non-profit Open Web Application Security Task (OWASP) explains the possible effect of these sort of vulnerabilities as severe, which might or may not hold true specific to this vulnerability.
The description at OWASP:
“The impact of deserialization flaws can not be overemphasized. These defects can result in remote code execution attacks, one of the most major attacks possible.The service effect depends upon the security needs of the application and data. “But OWASP also keeps in mind that exploiting this kind of vulnerability tends to be tough:”Exploitation of deserialization is somewhat tough,
as off the rack exploits hardly ever work without changes or tweaks to the underlying exploit code.”The vulnerability in the Stop Spammers Security WordPress
plugin was repaired in version 2022.6 The main Stop Spammers Security changelog (a description with dates of different updates)notes the fix as an improvement for security. Users of the Stop Spam Security plugin must consider upgrading to the current
variation in order to avoid a hacker from exploiting the plugin. Check out the official alert at the United States Government National Vulnerability Database
: CVE-2022-4120 Information Check out the WPScan publication of details associated with this vulnerability:
Stop Spammers Security