hunt-write-gap

Tests API endpoints for unauthorized write access when read access is properly protected.

6|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-write-gap-wyl-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-write-gap
Source: https://github.com/Wyl-cmd/kxns-cli/tree/main/src/kxns_cli/skills/hunt-write-gap
Command: npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-write-gap-wyl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? APIs often enforce authorization on read operations (GET) while leaving write operations (PATCH, POST, DELETE) unprotected, allowing authenticated users to escalate privileges, modify balances, or tamper with other users' data. This Skill systematically detects these write-gap vulnerabilities during authorized penetration tests. ## Core Features & Use Cases - Writeable Endpoint Discovery: Probes discovered endpoints with PATCH, PUT, and POST methods to identify which accept write operations based on HTTP status codes. - Privilege Escalation Testing: Attempts to modify privileged fields such as tier, role, balance, subscription status, and rate limits to confirm authorization gaps. - Cross-User Write (IDOR) Detection: Tests whether write filters targeting other users' records succeed, distinguishing self-write issues from critical mass-exploitation flaws. - Use Case: During an authorized assessment of a Supabase-backed SaaS application, you confirm GET /subscribers only returns your own data, then use this Skill to discover PATCH /subscribers lets you upgrade your account to a Pro tier without payment. ## Quick Start Ask the agent to test the target API endpoints for write-gap vulnerabilities using your authenticated token and report any unauthorized modification of privileged fields.

Frequently Asked Questions about hunt-write-gap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test API endpoints for unauthorized write access?

Send PATCH, PUT, and POST requests to discovered endpoints with your authenticated token and check response codes. A 200 or 400 response indicates the endpoint accepts writes; then attempt to modify privileged fields like tier or balance and verify persistence with a GET request.

What is a write-gap vulnerability in REST APIs?

A write-gap vulnerability occurs when an API enforces authorization on GET requests but not on PATCH, POST, or DELETE requests. Attackers can then modify privileged fields such as subscription tier, account balance, or roles despite having read-only intended access.

Does this testing approach work with Supabase and Firebase?

Yes, the methodology is backend-agnostic and covers Supabase, Firebase, custom REST APIs, and GraphQL. It is particularly effective against Supabase-backed SaaS applications where Row Level Security may protect reads but miss write policies.

How do I test for cross-user write IDOR vulnerabilities?

After confirming your own data is writable, send a write request with a filter targeting other users, such as user_id not equal to your own. An empty response means row-level security blocked it; returned data confirms a critical cross-user write flaw.

Why does a write test return 200 but no changes persist?

Some endpoints accept requests but silently drop unauthorized fields or fail to persist changes. Always verify by issuing a GET request on the same resource afterward to distinguish a confirmed write gap from a false positive.