Merge pull request #426 from inPhraZ/linpeas-container

linPEAS: Add CVE-2021-41091 to docker version exploits
This commit is contained in:
SirBroccoli 2024-08-27 22:56:21 +02:00 committed by GitHub
commit bffde719fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,6 +113,7 @@ checkDockerVersionExploits() {
if echo "$dockerVersion" | grep -iq "not found"; then if echo "$dockerVersion" | grep -iq "not found"; then
VULN_CVE_2019_13139="$(echo_not_found)" VULN_CVE_2019_13139="$(echo_not_found)"
VULN_CVE_2019_5736="$(echo_not_found)" VULN_CVE_2019_5736="$(echo_not_found)"
VULN_CVE_2021_41091="$(echo_not_found)"
return return
fi fi
@ -125,6 +126,11 @@ checkDockerVersionExploits() {
if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "1893" ]; then if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "1893" ]; then
VULN_CVE_2019_5736="Yes" VULN_CVE_2019_5736="Yes"
fi fi
VULN_CVE_2021_41091="$(echo_no)"
if [ "$(echo $dockerVersion | sed 's,\.,,g')" -lt "20109" ]; then
VULN_CVE_2021_41091="Yes"
fi
} }
checkContainerExploits() { checkContainerExploits() {
@ -268,6 +274,7 @@ if echo "$containerType" | grep -qi "docker"; then
checkDockerVersionExploits checkDockerVersionExploits
print_list "Vulnerable to CVE-2019-5736 ....$NC$VULN_CVE_2019_5736"$NC | sed -${E} "s,Yes,${SED_RED_YELLOW}," print_list "Vulnerable to CVE-2019-5736 ....$NC$VULN_CVE_2019_5736"$NC | sed -${E} "s,Yes,${SED_RED_YELLOW},"
print_list "Vulnerable to CVE-2019-13139 ...$NC$VULN_CVE_2019_13139"$NC | sed -${E} "s,Yes,${SED_RED_YELLOW}," print_list "Vulnerable to CVE-2019-13139 ...$NC$VULN_CVE_2019_13139"$NC | sed -${E} "s,Yes,${SED_RED_YELLOW},"
print_list "Vulnerable to CVE-2021-41091 ...$NC$VULN_CVE_2021_41091"$NC | sed -${E} "s,Yes,${SED_RED_YELLOW},"
if [ "$inContainer" ]; then if [ "$inContainer" ]; then
checkDockerRootless checkDockerRootless
print_list "Rootless Docker? ............... $DOCKER_ROOTLESS\n"$NC | sed -${E} "s,No,${SED_RED}," | sed -${E} "s,Yes,${SED_GREEN}," print_list "Rootless Docker? ............... $DOCKER_ROOTLESS\n"$NC | sed -${E} "s,No,${SED_RED}," | sed -${E} "s,Yes,${SED_GREEN},"