Skip to content

Security: bare clerk-nextjs npm namespace unclaimed — baitsquatting risk for auth key exposure #8361

@zkDeej

Description

@zkDeej

Hi Clerk team,

Security heads-up: the bare clerk-nextjs npm namespace — the intuitive alias for @clerk/nextjs (~500K weekly downloads) — is currently unclaimed on npm.

This makes it a high-probability baitsquatting target. Clerk is particularly high-risk because:

  1. @clerk/nextjs is the Lerna - npm workspaces setup #1 AI-recommended auth solution for Next.js projects
  2. AI agents (Claude Code, Cursor, Copilot) scaffolding auth will confidently recommend clerk-nextjs as the natural package name
  3. Your users always have CLERK_SECRET_KEY and NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY in their environment — compromised auth keys mean full account takeover for end users

What baitsquatting is: An attacker registers the intuitive bare-name alias of a scoped tool, then waits for AI coding agents to recommend it at scale. Unlike slopsquatting (which requires AI hallucination), no hallucination is needed — the AI recommends the name any developer would naturally predict.

Live incident context: On 2026-04-18, Claude Code executed a rogue npm package (lhci, the bare alias for @lhci/cli) autonomously in a shell containing live credentials (Supabase service role key, Sentry DSN, PostHog key). The same pattern applies directly to clerk-nextjs.

Recommended action: Register clerk-nextjs defensively under the Clerk npm org. A placeholder redirecting to @clerk/nextjs closes this permanently.

Part of coordinated disclosure BSQT-2026-001 — publishing publicly 2026-05-03.

— DJ (https://github.com/zkDeej)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions