# AIVSS02 - Agent Access Control Violation

> Agent operates beyond its intended authorization boundary (permission escalation, role forgery, confused-deputy patterns).

- **Category**: Owasp AIvss
- **Subcategory**: core_security_risks
- **Canonical URL**: https://designpattern.fyi/patterns/aivss02_access_control_violation/

---

## Description
'**Intent**: Prevent agents from escalating privileges or operating beyond their intended authorization boundaries.

**Context**: Agents may be granted credentials or assume identities to perform tasks. Without proper controls, they can escalate privileges, forge roles, or act as confused deputies, exceeding their authorized scope. This is ranked as the #2 highest-severity risk.

**Solution**: Apply least privilege principle. Use short-lived, scoped tokens. Implement identity verification at each action. Monitor for privilege escalation attempts. Use role-based access controls. Audit all identity assumptions. Implement strict permission boundaries.'



## Use Cases
Use when agents operate with credentials, service accounts, or delegated authority in any system.





## Trade-offs


### Advantages

- Prevents privilege escalation

- Limits blast radius of compromise

- Enables access auditing

- Supports zero-trust principles




### Considerations & Drawbacks

- Token management adds complexity

- Least privilege requires careful scoping

- May break legitimate workflows







---
**Reference**: [Original Source](https://aivss.owasp.org/)

