# Infisical Pentest

> Use when self-hosted Infisical pentest: leaks, gates, CVEs.

- Skill: `yufeifeio/infisical-pentest` (Agent Skill)
- Install (CLI): `npx get-skill add yufeifeio/infisical-pentest`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yufeifeio/infisical-pentest/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: Yufeifeio (https://skillmd.com/u/yufeifeio)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/yufeifeio/infisical-pentest

---


# Infisical (self-hosted) — recon & attack surface

Infisical = open-source secrets manager (Vault alternative; Fastify API + SPA frontend). Everything below validated on a live **0.165.6** instance unless marked [research/upstream].

## Fingerprint (all unauthenticated)
- `GET /api/status` → `{"message":"Ok","emailConfigured":true,"inviteOnlySignup":false,"redisConfigured":true,...}`.
- `GET /api/v1/admin/config` → instance config: `initialized`, `allowSignUp`, `allowedSignUpDomain`, **`defaultAuthOrgId` + `defaultAuthOrgSlug`**, `enabledLoginMethods` (email/google/saml/oidc), `passwordPolicy`, `latestAvailableVersion`. **Read this FIRST** — it tells you which auth routes exist and whether a default org auto-joins new SSO users.
- Version: from the SPA bundle filename (`/assets/index-v0-165-6-*.js` → 0.165.6); cross-check `latestAvailableVersion` in the config.

## Default org semantics (why it matters)
`defaultAuthOrgId`/`defaultAuthOrgSlug` + `defaultAuthOrgAuthEnforced:false` = users arriving via SSO (especially **google**) may be **auto-added to that org**. If google login is enabled and a default org is set, that's the door to test: an external Google account might join the org (then its role/membership decides the damage).

## Google-SSO door (UI details, validated)
- **The Google button lives on `/signup`, not `/login`** — a login page showing only "Continue with Email" does NOT mean google is off (validated: `enabledLoginMethods:[email,google]` + the Google button present on `/signup`). Open `/signup` → "Continue with Google" → OAuth popup on `accounts.google.com` (client_id visible in the popup URL).
- Popup oracle: enter a candidate email → password field appears = account EXISTS; "Wrong password" = one burned attempt; cap 1–2 per account, human-paced. Real-gesture / popup / `:visible` mechanics: `corporate-sso-admin-pentest` §4.
- Signup probes must use addresses on the `allowedSignUpDomain` shown in `/api/v1/admin/config` — throwaway-inbox addresses can't pass it.
- Status flags can disagree: `/api/status` `inviteOnlySignup:false` while admin config `allowSignUp:false` → signup is CLOSED (observed). The admin config wins.

## Login attempts (email = SRP — drive the SPA, don't hand-roll)
Email login is SRP and the SPA computes the proof — don't reimplement SRP; drive the real browser over CDP. Works for any React login form: set `#email` / `#current-password` via the native value setter (`Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set`) + dispatch `input`/`change`, then `form.requestSubmit()`. Verdict: success = URL leaves `/login`; failure = inline "Wrong credentials" toast, URL stays `/login` (failed attempts also write `infisical.lastLogin` to localStorage — verbosity tell). Observed: no lockout across ~19 attempts spread over two instances (candidates included validated staff/QA roster pairs and real staff/test accounts mined from the org's ticketing system — ALL failed; ticket-mined account lists are a spent bullet on this class of target) — still keep attempts sparse (see Pitfalls).

## Gates (validated shut on a mature instance)
- `POST /api/v1/admin/bootstrap` (first-superadmin creation) → `400 Instance has already been set up` once initialized. Try it exactly once — harmless, no leak.
- Signup routes 404 outright when `allowSignUp:false` (`/api/v1|v2|v3/auth/signup`, `/api/v3/auth/signup/complete`, `/api/v1/signup`) — don't conclude "signup works" from `/api/status` flags alone; the admin-config flag wins.
- **Config flags oversell signup**: on 0.165.6, an instance with `allowSignUp:true` + `allowedSignUpDomain` set still 404'd every `/api/v1|v2|v3/auth/signup[/email]` route tested — in practice invite-only. Find the REAL route names by grepping the SPA bundle: fetch `/assets/index-v0-165-6-*.js`, then `re.findall(r'(?:auth|signup|invite)[A-Za-z/_0-9-]*', js)` → `signup/complete-account`, `invite-org/signup`, `invite-org/verify`, `invite-org/signup-resend`. Treat signup as invite-only until you hold an invite code/link.
- Non-admin cannot self-promote; `/api/v1/admin/*` management routes enforce super-admin server-side.

## CVE / version triage
- Compare instance version vs `latestAvailableVersion`, then review upstream security PRs in the delta window:
  - **admin config over-exposure + webhook/integration URL validation hardening** (PR #6004, ~0.166) — pre-fix instances leak extra admin-config fields and allow **SSRF via webhook test** endpoints (POST to user-supplied URLs). [research/upstream]
  - **cross-org SSO account takeover** (LDAP/SAML/OIDC email binding, PR #5800 era) — older versions may let you bind a victim email to your own SSO config. [research/upstream]
  - **IDOR in `PUT /api/v3/external-migration/vault/configs/:id`** (issue #5941) — cross-org update if you can enumerate config UUIDs. [research/upstream]
- Redirect-following bugs on AI/MCP routes have been fixed in project history — always test yourself on the live version.

## Misc checks
- `isPublicSecretSharingDisabled:false` → public share links exist; UUIDs aren't brute-forcible — scrape docs/search engines for `shared` URLs instead.
- With ANY authenticated account (own org): webhook/integration "test" actions are the classic SSRF primitive; also try org-ID swaps on UUID-scoped routes for cross-project reads.

## Related vendor ecosystem
- The vendor's product/SDK repos can hardcode a **STAGE host** (validated pattern: `ps-stage.<vendor>.cloud` → a separate Django payment/merchant platform worth its own login matrix). Check their GitHub org for open SDKs.
- **同一产品常按子公司/组织多实例部署**（本案例两个实例、org slug 各不同，各自独立域名）——先把 sister 域枚举齐再决定投注；当组织正**从 HashiCorp Vault 迁往本产品**（迁移工单/文档会明说）时，这些实例 = 全公司密钥总闸，且迁移期机器身份（universalAuth clientId/secret）常散落在 CI/部署配置与工单里——去那边找，比投口令高效。

## Pitfalls
- Stage ≠ prod credential universes: established creds pools often miss entirely (30-combo miss, no lockout = keep it slow, rotate username dimension to roster emails of the vendor domain).
- Provisioned identities live apart: even *real* staff/test credentials harvested from the org's ticketing system failed across instances — Infisical accounts are provisioned separately. Spend budget on **universalAuth machine identities (clientId/clientSecret)** in CI/deploy configs, helm values and `.env` loot, and on invite-link/code leakage — not on more harvested account lists.
- Don't report "signup disabled" from one 404 route family — route names differ per version; the admin config flag is the truth.

