pydantic-dev
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: HIGHREMOTE_CODE_EXECUTION
Full Analysis
- [Indirect Prompt Injection] (HIGH): The documentation describes features that ingest external data (JSON, Python dicts) and map them to types with execution side effects. Ingestion points:
model_validate_json(references/examples/files.md),TypeAdapter.validate_python(references/concepts/type_adapter.md). Boundary markers: Absent in example code. Capability inventory:ImportString(references/api/types/ImportString.md),create_model(references/api/base_model/create_model.md). Sanitization: Not demonstrated; documentation explicitly warns about RCE increate_model. - [Remote Code Execution] (HIGH): The
create_modelfunction andImportStringtype provide mechanisms for dynamic code evaluation and module loading. The documentation forcreate_model.mdexplicitly warns that it can execute arbitrary code contained in field annotations.ImportString.mddemonstrates importing Python objects from strings, which is exploitable if inputs are attacker-controlled. - [Dynamic Execution] (MEDIUM): Multiple files describe runtime code generation or dynamic loading.
ImportStringperforms dynamic loading from computed paths.create_modelperforms dynamic code generation based on annotations. These are documented as features but represent high-risk primitives in an AI agent context.
Recommendations
- AI detected serious security threats
Audit Metadata