igbuend/grimbard/excessive-data-exposure-anti-pattern
Claude Code and agent skill by igbuend/grimbard
- community
Checking that the SKILL.md file is still in the repository.
Security anti-pattern for excessive data exposure (CWE-200). Use when generating or reviewing API responses, database queries, or data serialization. Detects returning more data than necessary including internal fields, sensitive attributes, and related records.
Install
npx vskill@latest install igbuend/grimbard/excessive-data-exposure-anti-patternSKILL.md
The same SKILL.md was published earlier as igbuend/grimbard/excessive-data-exposure-anti-pattern.
Excessive Data Exposure Anti-Pattern
Severity: High
Summary
Excessive Data Exposure occurs when APIs return more data than necessary for client functionality. This happens when endpoints serialize raw database objects or model classes without filtering sensitive fields. Attackers intercept API responses to access exposed PII, credentials, and internal system details, even when client-side UI hides this data.
The Anti-Pattern
Never serialize and return entire database objects or internal models. This exposes all object properties, including sensitive ones, assuming the client will filter what it needs.
BAD Code Example
GOOD Code Example
Language-Specific Implementations
JavaScript/TypeScript (NestJS):
Java (Spring Boot):
C# (ASP.NET Core):
Detection
- Review API responses: Use Burp Suite or OWASP ZAP to intercept API calls. Identify endpoints returning unused, internal, or sensitive fields (e.g.,
passwordHash,ssn,internalNotes). - Analyze database queries: Grep for
SELECT *queries feeding API responses. - Inspect serialization logic: Find generic
.toJSON()orserialize()methods dumping all object properties without filtering.
Prevention
- [ ] Use Data Transfer Objects (DTOs) or ViewModels with an explicit allowlist of fields for every API response.
- [ ] Never return raw database or ORM objects directly from an API endpoint.
- [ ] Select only the required columns in your database queries (
SELECT id, username FROM ...instead ofSELECT *). - [ ] Implement field-level authorization based on the user's permissions. For example, a user might see their own email address, but other users cannot.
- [ ] Filter on the server, not the client. Never rely on the client-side application to filter out sensitive data.
- [ ] Define different DTOs for different access levels (e.g., a
UserPublicDTOfor public profiles and aUserPrivateDTOfor a user viewing their own data).
Related Security Patterns & Anti-Patterns
- Missing Authentication Anti-Pattern: If an endpoint is missing authentication, excessive data exposure becomes even more dangerous.
- Mass Assignment Anti-Pattern: The inverse of this problem, where an API accepts more data than it should, leading to unauthorized modifications.
References
- OWASP Top 10 A01:2025 - Broken Access Control
- OWASP GenAI LLM02:2025 - Sensitive Information Disclosure
- OWASP API Security API3:2023 - Broken Object Property Level Authorization
- CWE-200: Information Exposure
- CAPEC-37: Retrieve Embedded Sensitive Data
- PortSwigger: Information Disclosure
- Source: sec-context
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/excessive-data-exposure-anti-pattern/SKILL.md
Popularity
- Repository stars
- 9
- Repository forks
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/igbuend/grimbard/excessive-data-exposure-anti-pattern)