A WordPress anti-spam plugin with over 60,000 installations patched a PHP Things injection vulnerability that emerged from improper sanitization of inputs, consequently enabling base64 encoded user input.
Unauthenticated PHP Object Injection
A vulnerability was discovered in the popular Stop Spammers Security|Block Spam Users, Remarks, Types WordPress plugin.
The function 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 block.
It is a required practice for any WordPress plugin or form that accepts a user input to just enable particular inputs, like text, images, email addresses, whatever input is anticipated.
Unexpected inputs must be filtered out. That filtering process that keeps out unwanted inputs is called sanitization.
For instance, a contact kind ought to have a function that checks what is sent and block (sanitize) anything that is not text.
The vulnerability found in the anti-spam plugin permitted encoded input (base64 encoded) which can then trigger a kind of vulnerability called a PHP Object injection vulnerability.
The description of the vulnerability released on the WPScan website describes the issue as:
“The plugin passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are used as 2nd obstacle, which might cause PHP Item injection if a plugin installed on the blog site has an ideal gizmo chain …”
The category of the vulnerability is Insecure Deserialization.
The non-profit Open Web Application Security Project (OWASP) describes the possible effect of these type of vulnerabilities as major, which might or might not hold true specific to this vulnerability.
The description at OWASP:
“The effect of deserialization defects can not be overemphasized. These flaws can lead to remote code execution attacks, among the most severe attacks possible.The organization effect depends upon the protection needs of the application and data. “However OWASP likewise keeps in mind that exploiting this type of vulnerability tends to be challenging:”Exploitation of deserialization is somewhat difficult,
as off the shelf 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 official Stop Spammers Security changelog (a description with dates of numerous updates)notes the fix as an enhancement for security. Users of the Stop Spam Security plugin need to consider updating to the latest
variation in order to prevent a hacker from making use of the plugin. Check out the official notification at the United States Federal Government National Vulnerability Database
: CVE-2022-4120 Information Check out the WPScan publication of information connected to this vulnerability:
Stop Spammers Security