← Back to your requirements

How to meet it OWASP AISVS v1.01

Model Context Protocol (MCP) Security · Schema, Message, and Input Validation

Limit schema validation depth

AISVS 10.4.13 Level 2

Verify that MCP implementations apply resource bounds to schema validation, such as a maximum schema depth, a cap on the total number of nested schema elements, or a per-validation time budget.

OWASP AISVS v1.01, requirement 10.4.13

In plain English

Put limits on schema validation itself, such as maximum depth, number of nested elements or time, so a crafted schema cannot exhaust resources.

What good looks like

  • Depth and size limits apply to schemas.
  • Validation has a time budget.
  • Schemas over the limits are rejected.

How teams usually do it

  • Configuration options in your validation library, plus a wrapper timeout.

Evidence an auditor would accept

  • Configuration and tests with deeply nested schemas.

Common mistakes

  • Unlimited validation on schemas supplied by remote servers.

Not sure which requirements apply to your system? Take the assessment.

Requirement text from the OWASP AI Security Verification Standard, licensed under CC BY-SA 4.0. This guidance is shared under the same licence.