Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentAI infrastructure

Langflow: unauthenticated code execution exploited in the wild

CriticalLangflow

Langflow, a popular visual builder for AI apps, had an API endpoint that ran Python code from anyone on the internet without a login. Attackers exploited it, CISA listed it as known exploited, and one campaign used it to build a DDoS botnet.

Replay the attack step by step in the Learning Center

How it happened

  1. Langflow's code-validation endpoint required no authentication.
  2. It passed submitted code to Python's exec(), so attacker code ran on the server.
  3. Attackers found exposed servers and used a public exploit.
  4. One campaign ran reconnaissance, then installed the Flodrix botnet.

Impact

Full takeover of the Langflow server and the API keys and data it held.

The fix

Langflow 1.3.0 (March 2025) requires authentication on the endpoint; keep Langflow off the public internet.

Lessons

  • AI workflow builders hold many API keys; never expose them without strong authentication.
  • Features that validate or run code are code execution surfaces and need real sandboxing.
  • Watch the CISA KEV catalog: exploits for AI tools arrive within weeks.

Sources