A WordPress anti-spam plugin with over 60,000 setups covered a PHP Object injection vulnerability that occurred from incorrect sanitization of inputs, subsequently permitting base64 encoded user input.
Unauthenticated PHP Object Injection
A vulnerability was discovered in the popular Stop Spammers Security|Block Spam Users, Remarks, Kinds WordPress plugin.
The function of the plugin is to stop spam in comments, kinds, and sign-up registrations. It can stop spam bots and has the ability for users to input IP addresses to obstruct.
It is a required practice for any WordPress plugin or kind that accepts a user input to only permit particular inputs, like text, images, email addresses, whatever input is expected.
Unforeseen inputs need to be removed. That filtering procedure that keeps out undesirable inputs is called sanitization.
For instance, a contact kind must have a function that checks what is submitted and block (sanitize) anything that is not text.
The vulnerability discovered 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 explains the concern as:
“The plugin passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are utilized as 2nd difficulty, which could cause PHP Object injection if a plugin set up on the blog has an appropriate gadget chain …”
The category of the vulnerability is Insecure Deserialization.
The non-profit Open Web Application Security Task (OWASP) describes the possible impact of these type of vulnerabilities as serious, which may or might not hold true specific to this vulnerability.
The description at OWASP:
“The impact of deserialization defects can not be overemphasized. These defects can lead to remote code execution attacks, among the most major attacks possible.The business impact depends on the security needs of the application and information. “However OWASP likewise notes that exploiting this kind of vulnerability tends to be difficult:”Exploitation of deserialization is rather challenging,
as off the shelf exploits seldom work without modifications or tweaks to the underlying exploit code.”The vulnerability in the Stop Spammers Security WordPress
plugin was fixed 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 must think about upgrading to the current
version in order to avoid a hacker from making use of the plugin. Check out the official alert at the United States Government National Vulnerability Database
: CVE-2022-4120 Information Read the WPScan publication of information related to this vulnerability:
Stop Spammers Security