Skip to content

Commit 1a0f4f8

Browse files
Merge pull request #43 from majerugo/main
Adding detection for CVE-2025-9074
2 parents a08648d + b440672 commit 1a0f4f8

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

deepce.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ TIP_DOCKER_ROOTLESS="In rootless mode privilege escalation to root will not be p
125125
TIP_CVE_2019_5021="Alpine linux version 3.3.x-3.5.x accidentally allow users to login as root with a blank password, if we have command execution in the container we can become root using su root"
126126
TIP_CVE_2019_13139="Docker versions before 18.09.4 are vulnerable to a command execution vulnerability when parsing URLs"
127127
TIP_CVE_2019_5736="Docker versions before 18.09.2 are vulnerable to a container escape by overwriting the runC binary"
128+
TIP_CVE_2025_9074="Docker Desktop versions between 4.25 to 4.44.2 on Windows and MacOS are vulnerable to a container escape via a malicious image. See https://github.com/PtechAmanja/CVE-2025-9074-Docker-Desktop-Container-Escape"
128129

129130
TIP_SYS_MODULE="Giving the container the SYS_MODULE privilege allows for kernel modules to be mounted. Using this, a malicious module can be used to execute code as root on the host."
130131

@@ -646,6 +647,50 @@ containerExploits() {
646647
printNo
647648
fi
648649
fi
650+
651+
# If docker api is exposed check for CVE-2025-9074
652+
if [ -x "$(command -v curl)" ] || [ -x "$(command -v wget)" ]; then
653+
printQuestion "Docker API exposed ......."
654+
api_available="0"
655+
656+
if [ -x "$(command -v curl)" ]; then
657+
curl -s --connect-timeout 1 http://192.168.65.7:2375/version >/dev/null 2>&1
658+
if [ $? -eq 0 ]; then
659+
api_available="1"
660+
fi
661+
elif [ -x "$(command -v wget)" ]; then
662+
wget -O - http://192.168.65.7:2375/version --connect-timeout=1 --tries=1 -q >/dev/null 2>&1
663+
if [ $? -eq 0 ]; then
664+
api_available="1"
665+
fi
666+
fi
667+
668+
if [ "$api_available" = "0" ]; then
669+
printNo
670+
return
671+
fi
672+
673+
printSuccess "Yes"
674+
printQuestion "└── CVE-2025-9074 ......."
675+
676+
if [ -x "$(command -v curl)" ]; then
677+
curl -s --connect-timeout 1 http://192.168.65.7:2375/containers/json >/dev/null 2>&1
678+
if [ $? -eq 0 ]; then
679+
printYesEx
680+
printTip "$TIP_CVE_2025_9074"
681+
else
682+
printNo
683+
fi
684+
elif [ -x "$(command -v wget)" ]; then
685+
wget -O - http://192.168.65.7:2375/containers/json --connect-timeout=1 --tries=1 -q >/dev/null 2>&1
686+
if [ $? -eq 0 ]; then
687+
printYesEx
688+
printTip "$TIP_CVE_2025_9074"
689+
else
690+
printNo
691+
fi
692+
fi
693+
fi
649694
}
650695

651696
enumerateContainers() {

0 commit comments

Comments
 (0)