Exploit database

GH-c97cc447ad575d5f16bdff2de597d43c

im0xfay/cve-2026-121684

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-121684

1 source

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

Repository files9
im0xfay/cve-2026-121684Revision 89ea7c0dfbba

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

lab/wp.sh

Shell · 1,771 bytes
#!/usr/bin/env bash
# wp-cli helper for the CVE-2026-121684 lab.
#
#   bash wp.sh core version
#   bash wp.sh plugin list
#   bash wp.sh option get siteurl
#   bash wp.sh eval '$t=wp_get_theme("soledad"); echo $t->get("Version");'
#
# Runs `wp` inside the wpcli service as uid 33 (www-data), so everything it writes
# to the docroot stays Apache-readable. No sudo password is echoed.
set -euo pipefail
cd "$(dirname "$0")"

# Sudo is only needed to copy files into the named containers; set SUDO_PASS
# in the environment if your docker requires a password. Never hardcode it.
SUDO_PASS="${SUDO_PASS:-}"
SDK() { printf '%s\n' "$SUDO_PASS" | sudo -S -p '' "$@"; }

if [ $# -eq 0 ]; then
  echo "usage: bash wp.sh <wp-cli args...>" >&2
  echo "   eg: bash wp.sh core version" >&2
  exit 2
fi

# SITE is only used to supply HTTP_HOST to the wp-cli bootstrap; without it wp
# prints "Undefined array key HTTP_HOST" and several subcommands abort.
SITE="${SITE:-http://127.0.0.1:8210}"

if SDK docker ps --format '{{.Names}}' 2>/dev/null | grep -qx soledad-wpcli; then
  SDK docker compose -f docker-compose.yml exec -T wpcli \
    wp --allow-root --path=/var/www/html --url="$SITE" "$@"
elif SDK docker ps --format '{{.Names}}' 2>/dev/null | grep -qx soledad-wp; then
  # Fallback: the apache container ships no wp-cli, but it has php + mysqli, so a
  # shim is fetched on first use.
  SDK docker exec -u 33 soledad-wp sh -c \
    'command -v /tmp/wp >/dev/null 2>&1 || { curl -sSL -o /tmp/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x /tmp/wp; }'
  SDK docker exec -u 33 soledad-wp /tmp/wp --allow-root --path=/var/www/html --url="$SITE" "$@"
else
  echo "[!] no lab container running — start it with: bash up.sh" >&2
  exit 1
fi