WordPress Plugin Vulnerabilities

Contact Form by WPForms < 1.7.5.5 - Admin+ Arbitrary File Access

Description

The plugin does not validate email template paths, which could allow high privilege users such as admin (for example in multisite) to access arbitrary files on the web server via a path traversal attack

Proof of Concept

1. Install WP Forms.
2. Go to `/wp-admin/admin.php?page=wpforms-settings&view=email`.
3. Select template "HTML Template".
4. In DevTools (F12) edit option `wpforms-setting-email-template[1]` value, set it from `default` to `default.php/../../../../../../wp-admin/edit-form-comment` (to require `/wp-admin/wp-admin/edit-form-comment.php`).
5. Hit "Save Settings".
6. Create any form with any fields. Enable notifications for it, with "Send to Email Address" to an active inbox.
7. Preview the form or display it on a page.
8. Send email via form (or use built-in form confirmation tester). 
9. The email address set at step 6. will have an email displaying contents of file in inbox.

Affects Plugins

Fixed in 1.7.5.5

Classification

Type
TRAVERSAL
OWASP top 10
CWE

Miscellaneous

Original Researcher
Sybre Waaijer
Submitter
Sybre Waaijer
Submitter website
Submitter twitter
Verified
Yes

Timeline

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

Other