exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Caldera Forms 1.5.9.1 Cross Site Scripting

WordPress Caldera Forms 1.5.9.1 Cross Site Scripting
Posted Apr 19, 2018
Authored by Federico Scalco

WordPress Caldera Forms plugin version 1.5.9.1 suffers from a cross site scripting vulnerability.

tags | exploit, xss
advisories | CVE-2018-7747
SHA-256 | 5ba544e8afc1bd3b2ce994ab5600e72cb1ca79a17152a722178a125e25528c4e

WordPress Caldera Forms 1.5.9.1 Cross Site Scripting

Change Mirror Download
# Exploit Title: CalderaForms 1.5.9.1 - multiple XSS
# Date: 02-03-2018
# Exploit Author: Federico Scalco
# fscalco at mentat dot is
# @mindpr00f
# Vendor Homepage: https://calderaforms.com/
# Software Link: https://wordpress.org/plugins/caldera-forms/
# Vulnerable App: https://github.com/CalderaWP/Caldera-Forms/archive/1.5.9.1.zip
# Version: 1.5.9.1 (older versions may also be affected)
# Tested on: WordPress 4.9.4
# CVE : i>>?CVE-2018-7747



1) SOFTWARE DESCRIPTION
"i>>?Caldera Form is a free and powerful WordPress plugin that creates
responsive forms with a simple drag and drop editor."
It is reported to have i>>?100,000+ active installations at the moment of this
writing.



2) VULNERABILITY OVERVIEW
The application fails to validate user-supplied input, hence it stores the
unsanitized buffer in the database.
The vulnerabilities reported here will be exploitable ONLY if certain
conditions are met, which is not the case in a CF's default configuration
(although still being vulnerable).

A note on buffers containing strings:
single (') and double (") quotes are correctly escaped, backticks (`)
are not.



3) DETAILS

3.a) Stored XSS - public
When submitting a CF form, the plugin will show a greeting message to
notify the user that everything went ok.
This message is editable by the site's admin and can contain part of the
user-supplied data (e.g. they're first name). In this case, simply inject
HTML code into the parameter which gets returned in the greeting message
and submit the POST request. A JSON response will follow, containing, among
other data:
- the greeting message ("html", which contains the malicious payload that
gets executed right away)
- form's ID ("form_id")
- data's ID ("cf_id")

{
"data":{"cf_id":"<DATA_ID>"},
"html":"<GREETING MESSAGE>",
"type":"...",
"form_id":"<FORM_ID>",
"form_name":"...",
"status":"..."
}

At this point, to reach the stored XSS, simply build a GET request using
the obtained data.
The malicious payload will be found at

http(s)://<target>/cf-api/<FORM_ID>/?cf_su=1&cf_id=<DATA_ID>

Vulnerable config:
- form > form settings > capture entries > checked (ON by default)
- form > form settings > success message > add some of the user
supplied fields (absent by default)

To replicate this on a fresh install:
- Create a new, default, contact form
- Go to "Form Settings" tab and edit the success message to include,
for example, the user's first name.
e.g.: Form has been successfully submitted. Thank you %first_name%.
- Save & publish
- As an unauthenticated user, submit the contact form injecting HTML
code in first name's parameter. XSS will be triggered right away
- To recall the payload as a stored XSS, read the POST's response and
point your browser to
<target>/cf-api/<FORM_ID>/?cf_su=1&cf_id=<DATA_ID>



3.b) Stored XSS - admin interface
CalderaForms gives the ability to notify the admin via email everytime a
form gets submitted.
Furthermore, an admin can choose to enable an "email transacion log" for
debugging purposes (disabled by default).
If this configuration is in place, a copy of the malicious payload
described above will be shown in the administration panel, when visiting
that form's malicious entry's details.

Vulnerable config:
- form > form settings > capture entries > checked (ON by default)
- form > email > debug mailer > checked (OFF by default)

To replicate this on a fresh install:
- Enable the transaction log (form -> edit -> email tab -> check
"Enable email send transaction log")
- Replicate the injection described at 3.a (all fields can be used this
time) as an unauthenticated user
- Back again in the admin interface, visit form's entries, identify the
malicious one and click on the "view" button

This will pop a details window and trigger the XSS.



3.c) Importing a weaponized form - admin interface
CalderaForms gives the ability to import a form (JSON format).
A malicious form field can be crafted which will trigger an XSS when said
field gets displayed/edited after the import.

It's worth noting that this flaw does not depend on custom configurations,
although it's not "remotely" and "automatically" exploitable. The problem
here arise, for example, when an admin imports a malicious JSON.

To replicate this on a fresh install:
- Create a form and export it (JSON format)
- Edit the json and inject HTML code. "label" and "slug" parameters
were tested, others may be vulnerable too.
e.g.:
{
...
"label":"First<script>alert(1);</script> Name",
"slug":"first_name\"/><script>alert(2);</script>"
...
}

- Import the malicious form to trigger the XSS in the administration
interface



4) REMEDIATION
Update to the latest version available.

If any personalized configuration is found exploitable, the following steps
can be followed, as a temporary mitigation strategy, if no update is
available or updating is not an option, for whatever reason:
- for every form, under "Form Settings", prune every variable that gets
returned to the user as a success message
- for every form, under the "Email" tab, un-check "Enable email send
transaction log"
- for every form that gets imported perform a thorough review



5) TIMELINE & FINAL NOTES

02-03-18 > vendor gets notified
06-03-18 > vendor replies
07-03-18 > CVE requested and assigned
27-03-18 > patch released
27-03-18 > vulnerability disclosed

Special thanks go to Josh Pollock and his team, from Caldera, who invested
passion and energy in understanding and patching these issues.

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close