exploiting-excessive-data-exposure-in-api

Detect excessive API data exposure by comparing JSON responses with OpenAPI specs.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Acczdy/MoZiSec --skill exploiting-excessive-data-exposure-in-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exploiting-excessive-data-exposure-in-api
Source: https://github.com/Acczdy/MoZiSec/tree/main/api-security/.claude/skills/exploiting-excessive-data-exposure-in-api
Command: npx skills add https://github.com/Acczdy/MoZiSec --skill exploiting-excessive-data-exposure-in-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Detects and helps remediate excessive data exposure where APIs return more fields than the client needs, leaking PII, internal identifiers, debug info, or other sensitive business data that should remain server-side.

Core Features & Use Cases

  • Field enumeration: Recursively discovers all fields in JSON responses and counts total surface area returned by endpoints.
  • PII and pattern detection: Uses regex-based detection for emails, SSNs, credit cards, tokens, IPs, and other common sensitive data patterns.
  • Schema comparison & GraphQL analysis: Compares responses to OpenAPI specs and performs GraphQL introspection to identify over-fetchable fields.
  • Use Case: Ideal for penetration tests of mobile banking or multi-client APIs where the frontend displays a subset of data but the API may expose sensitive fields.

Quick Start

Run the included agent.py against a target API URL with a valid Bearer token to produce a JSON report of exposed fields and PII matches.

Frequently Asked Questions about exploiting-excessive-data-exposure-in-api

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

FAQPage Schema
How do I detect excessive data exposure in API responses during a penetration test?

To detect excessive data exposure, enumerate all JSON response fields and match them against regex patterns for PII such as emails, SSNs, and credit cards. This reveals sensitive business data that should remain server-side.

What is excessive data exposure in GraphQL and REST APIs?

Excessive data exposure occurs when APIs return more fields than the client needs, leaking PII, internal identifiers, or debug info. In GraphQL, this involves over-fetchable fields discovered through schema introspection.

How do I compare API responses with OpenAPI specs to find leaked fields?

You can compare API responses with OpenAPI specs to find leaked fields by analyzing actual JSON outputs against the defined schema. This highlights undocumented fields and sensitive data outside the expected response surface area.

Can I analyze captured JSON files or use proxy interception to detect PII in APIs?

Yes, you can analyze captured JSON files or use proxy interception to detect PII in APIs. The approach supports processing JSON files directly and integrating with proxy workflows during mobile app assessments.

Does this API data exposure detection require specific dependencies or environments?

API data exposure detection requires the Python requests library as a dependency. You run it against a target API URL with a valid Bearer token to produce a JSON report of exposed fields and PII matches.