A WordPress anti-spam plugin with over 60,000 setups covered a PHP Object injection vulnerability that occurred from incorrect sanitization of inputs, subsequently allowing base64 encoded user input.
Unauthenticated PHP Object Injection
A vulnerability was found in the popular Stop Spammers Security|Block Spam Users, Remarks, Kinds 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 ability 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 only permit specific inputs, like text, images, e-mail addresses, whatever input is expected.
Unforeseen inputs need to be removed. That filtering process that keeps out undesirable inputs is called sanitization.
For example, a contact type must have a function that checks what is sent and block (sanitize) anything that is not text.
The vulnerability found in the anti-spam plugin allowed encoded input (base64 encoded) which can then trigger a type of vulnerability called a PHP Object injection vulnerability.
The description of the vulnerability published on the WPScan site describes the issue as:
“The plugin passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are used as second challenge, which might result in PHP Object injection if a plugin installed on the blog site has an appropriate gadget chain …”
The classification of the vulnerability is Insecure Deserialization.
The non-profit Open Web Application Security Task (OWASP) describes the possible effect of these type of vulnerabilities as serious, which may or might not be the case specific to this vulnerability.
The description at OWASP:
“The effect of deserialization flaws can not be overemphasized. These flaws can result in remote code execution attacks, one of the most serious attacks possible.The service effect depends on the security needs of the application and information. “However OWASP likewise keeps in mind that exploiting this sort of vulnerability tends to be hard:”Exploitation of deserialization is rather tough,
as off the rack exploits hardly ever work without modifications or tweaks to the underlying make use of 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 various updates)keeps in mind the fix as an improvement for security. Users of the Stop Spam Security plugin must think about updating to the current
version in order to avoid a hacker from making use of the plugin. Check out the official notification at the United States Government National Vulnerability Database
: CVE-2022-4120 Information Read the WPScan publication of details connected to this vulnerability:
Stop Spammers Security