# SSRF and Command Injection via Tool-Connected LLMs

> Master the risks of SSRF and Command Injection in tool-connected LLMs. Learn how attackers manipulate function calls to compromise infrastructure.

Canonical: https://codelivly.com/rooms/ssrf-and-command-injection-via-tool-connected-llms
Last updated: 2026-10-12

| | |
|---|---|
| Level | Intermediate |
| Category | Cybersecurity |
| Lessons | 3 |
| Estimated time | 30 min |
| XP | 100 |

This module explores the critical vulnerabilities introduced when LLMs are connected to external tools and APIs. You will learn how attackers exploit function calling and agentic workflows to trigger Server-Side Request Forgery (SSRF) and OS Command Injection, and how to implement robust defenses like strict allowlisting, parameter validation, and least-privilege tool execution.

## Lessons

1. What Happens When an LLM Can Trigger Real Actions (30 min)
2. Crafting Prompts That Abuse Tool Outputs for SSRF (30 min)
3. Crafting Prompts That Trigger Command Injection (30 min)

## Related

- [Learning path: Insecure Output Handling and Downstream Attacks](https://codelivly.com/learning-paths/insecure-output-handling-downstream-attacks)
- [All rooms](https://codelivly.com/rooms)
