Exploit database

GH-ca2947e15c3bd8b8fbf26697905711c0

moxitpanchal/evershop-lab-cve-2026-25993

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-25993

1 source

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

Repository files5
moxitpanchal/evershop-lab-cve-2026-25993Revision 68012ab39593

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

entrypoint.sh

Shell · 2,993 bytes
#!/bin/bash
set -e

echo "[entrypoint] Waiting for PostgreSQL at ${DB_HOST}:${DB_PORT}..."

# Wait for PostgreSQL to be ready
until pg_isready -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -q; do
  echo "[entrypoint] PostgreSQL not ready yet, retrying in 3s..."
  sleep 3
done

echo "[entrypoint] PostgreSQL is ready."

# Create .env file (the app uses dotenv to load it, but env vars also work)
# This is needed because some parts of the app read from .env specifically
cat > /evershop/.env << EOF
DB_HOST="${DB_HOST}"
DB_PORT="${DB_PORT}"
DB_NAME="${DB_NAME}"
DB_USER="${DB_USER}"
DB_PASSWORD="${DB_PASSWORD}"
DB_SSLMODE="${DB_SSLMODE:-disable}"
EOF

# Create required directories
mkdir -p /evershop/media
mkdir -p /evershop/public
mkdir -p /evershop/.evershop/build

# Build the frontend (webpack) - this creates the storefront assets
echo "[entrypoint] Building EverShop frontend..."
npm run build || {
  echo "[entrypoint] Frontend build had issues, continuing anyway..."
}

# Start the EverShop application in background
# npm start runs startUp.js which:
#   1. Loads bootstrap scripts from all modules
#   2. Runs database migrations (creates all tables, triggers, etc.)
#   3. Starts the HTTP server on port 3000
#   4. Spawns the event manager child process (polls event table every 10s)
#   5. Spawns the cron job child process
echo "[entrypoint] Starting EverShop application..."
npm run start &
APP_PID=$!

# Wait for the app to be ready
echo "[entrypoint] Waiting for app to start..."
for i in $(seq 1 60); do
  if curl -sf http://localhost:3000/ > /dev/null 2>&1; then
    echo "[entrypoint] EverShop is responding on port 3000."
    break
  fi
  if [ $i -eq 60 ]; then
    echo "[entrypoint] WARNING: App not responding after 120s, but continuing..."
  fi
  echo "[entrypoint] Waiting for app... ($i/60)"
  sleep 2
done

# Create the admin user using the evershop CLI
# This connects to the DB using the env vars / .env file
echo "[entrypoint] Creating admin user..."
node ./packages/evershop/dist/bin/evershop.js user:create \
  --name "${ADMIN_FULLNAME:-Admin}" \
  --email "${ADMIN_EMAIL:-admin@evershop.io}" \
  --password "${ADMIN_PASSWORD:-password123}" 2>&1 || {
  echo "[entrypoint] Admin user creation returned non-zero (may already exist). This is OK."
}

# Seed base data (categories, products, collection, widget)
echo "[entrypoint] Seeding base data..."
node /evershop/seed.js 2>&1 || {
  echo "[entrypoint] Seed script had an error, continuing anyway..."
}

echo ""
echo "============================================"
echo "  EverShop CVE-2026-25993 Lab is Ready"
echo "============================================"
echo "  Storefront:  http://localhost:3000"
echo "  Admin API:   http://localhost:3000/api/v1"
echo "  Admin Panel: http://localhost:3000/admin"
echo "  Credentials: ${ADMIN_EMAIL:-admin@evershop.io} / ${ADMIN_PASSWORD:-password123}"
echo "============================================"
echo ""

# Wait for the app process to keep running
wait $APP_PID