Langchain Insecure Maxiteration High

Setting max_iteration to None in Langchain AgentExecutor allows unlimited execution, leading to potential Denial-of-Service (DoS) due to uncontrolled resource consumption. Always set a specific value for max_iteration to prevent infinite loops.

Detector ID
python/langchain-insecure-maxiteration@v1.0
Category
Common Weakness Enumeration (CWE) external icon