Where Convenience Forgot to Lock the Door
Langflow's validate endpoint ran user-supplied Python code without authentication, so anyone who could reach the service could execute code as root. An attacker could use that access to read the secrets the container held, such as model provider tokens and cloud keys.
medium.com
Published on medium.com
Ai Security
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Langflow is an open-source, drag-and-drop platform for wiring language models, vector databases and custom logic into an AI application. One of its features is a validate endpoint, intended to let a developer test a snippet of code before wiring it into an agent.
The bug discussed here is CVE-2026-0768: a Python code execution flaw in that validate endpoint. The endpoint accepts a string and executes it. No authentication is required, and execution happens as root on versions up through 1.4.2. It carries a CVSS score of 9.8 out of 10.
The write-up frames this as a repeat: in 2025 a different bug lived in the same validate endpoint (CVE-2025-3248). That one was fixed by removing the Python exec() call and replacing it with something that only compiles code instead of running it. Four months after that fix shipped, unsafe execution was back in the same corner of the application, as a sibling bug with a new CVE number rather than the identical one.

The author also describes honeypots in the UK, on a machine that does not run anything real, which present themselves as Langflow instances. Since late August, researchers watching those decoys have logged wave after wave of requests, most originating from Russia, asking for the OpenAI key, the AWS secret, the contents of .bash_history, and generally what the host holds that is worth taking.
Setup
No accounts, roles or tooling are described. The precondition for exploitation is simply network reachability of a Langflow instance running a version up through 1.4.2. No login is needed, and the code runs as root.
Finding it
The report does not describe the researcher's own discovery process. What it does describe is the surrounding evidence: the honeypot traffic since late August, and the history of the same endpoint. The author's point is that the bug is not new in kind. A patched vulnerability class is not a closed vulnerability class; if nobody watches the spot itself, something else will stand in it again. Whether the reappearance was an incomplete fix, a merge that reverted the safe version, or a reintroduced feature nobody flagged as dangerous the second time, the report does not say.
Exploitation
The report gives no request, payload, command or response for this vulnerability. It states only that anyone can send Langflow a string and Langflow will run it, unauthenticated, as root, on versions up through 1.4.2. The mechanics of the request are not shown.
What the honeypots observed is the post-exploitation interest: requests asking for the OpenAI key, the AWS secret and the contents of .bash_history. Those requests are not reproduced either.
Root cause
The validate endpoint exists for a reasonable reason: developers need to test code before committing it to a workflow. The mistake is that "lets you run code" and "is reachable by anyone with a browser" ended up in the same sentence, and no hard enough line was drawn between them before it shipped. The endpoint was built under the assumption that whoever hits it is trusted by default, because in the original design they were. Then the application was containerised and shipped, and the assumption did not survive the trip.
The earlier fix removed exec() in favour of compilation only, which is not execution.
Impact
An unauthenticated attacker can execute Python code as root on a reachable Langflow instance up to 1.4.2. The author argues the shell is the entry fee, not the finish line: the real prize is every secret the container was trusted to hold, including model provider tokens, cloud access keys, database connection strings and the platform's own signing key. The honeypot traffic is consistent with that, with attackers asking for OpenAI and AWS credentials and shell history.
The report places this in a wider pattern: twelve separate exploited vulnerabilities tracked across the platform in a single year, against one before 2026 started, and more than 15,000 successful exploitation attempts across a cluster of related flaws against instances left facing the open internet. Ollama, Gradio and Open WebUI have had their own incidents this year.
Fix
The 2025 fix for CVE-2025-3248 replaced the exec() call with compilation only.
Variants to test
The author's guidance for hunting in agent frameworks, each point a concrete thing to try:
- Internal tooling endpoints. Look for routes that resemble leftover developer convenience, such as
/validate,/test,/previewor/debug, that were never meant to face the internet. - Flip the assumption about where power sits. Check whether the unauthenticated surface holds more raw capability than the authenticated one, because authentication was built for people managing agents while the exposed parts were built to let code run.
- Follow the credential trail. After a successful execution, map what it reaches: environment variables, cache directories and config files.
- Treat the dependency graph as attack surface. Examine vector databases, orchestration libraries, model SDKs and the CI pipelines that build and ship the application.
What happened, in plain words
Imagine a workshop where people build robots. The workshop gives you a workbench, a box of parts, and a little testing station where you can try out a piece of machinery before you bolt it into the robot. That testing station is meant to be used by the person building the robot, in their own workshop, behind a locked door.
Langflow is a piece of software a bit like that workshop. It is an open-source, drag-and-drop platform: you drag boxes around a screen and connect them, and the boxes represent language models (the kind of AI that reads and writes text), vector databases (places that store text in a form a computer can search by meaning), and small pieces of custom logic. Connect enough of them and you have something that looks like a finished AI product.
One of Langflow's features is a validate endpoint. An endpoint is a specific address inside a web application that accepts a request and does something in response, like a service counter in a shop: you go to the counter, hand over a form, and the clerk acts on it. The validate endpoint exists so a developer can hand over a snippet of code and have it tested before it is wired into an agent. An agent, here, means an AI setup that can take actions rather than just answer questions.
The bug is CVE-2026-0768. CVE stands for Common Vulnerabilities and Exposures: it is a public catalogue number given to a known security flaw so people can talk about it unambiguously, the way a car recall has a reference number. This one is a Python code execution flaw in that validate endpoint. Python is a programming language. Code execution means the software runs the code it is given, as a computer instruction, rather than just reading it as text.
The endpoint accepts a string, which is just a piece of text, and executes it. No authentication is required. Authentication is the process of proving who you are, usually with a username and password; without it, the application does not check who is asking. Execution happens as root. Root is the all-powerful administrator account on a Linux machine: the account that can read, change or delete anything. It carries a CVSS score of 9.8 out of 10. CVSS is a standard scoring system the industry uses to rate how severe a vulnerability is; 9.8 out of 10 is near the top of the scale.

The image sits at the top of the article, under the title and the author's name.
The write-up frames this as a repeat. In 2025 a different bug lived in the same validate endpoint, CVE-2025-3248. That one was fixed by removing the Python exec() call and replacing it with something that only compiles code instead of running it. exec() is a Python function that takes a piece of text and runs it as code. Compiling is the step of turning written code into a form the machine can run; it is not the same as running it. Four months after that fix shipped, unsafe execution was back in the same corner of the application, as a sibling bug with a new CVE number rather than the identical one.
The author also describes honeypots in the UK, on a machine that does not run anything real. A honeypot is a decoy: a fake system set up to look like a real, valuable target, so that anyone who attacks it reveals what they are looking for and how they work, while nothing real is at risk. These honeypots present themselves as Langflow instances. Since late August, researchers watching those decoys have logged wave after wave of requests, most originating from Russia, asking for the OpenAI key, the AWS secret, the contents of .bash_history, and generally what the host holds that is worth taking. An OpenAI key is a secret password-like string that lets software use OpenAI's AI services and is billed to its owner. An AWS secret is the equivalent for Amazon Web Services, Amazon's cloud computing platform. .bash_history is a file on Linux that records the commands a user has typed, which often reveals what the machine is used for and where its secrets live.
Setup
No accounts, roles or tooling are described. The precondition for exploitation is simply network reachability of a Langflow instance running a version up through 1.4.2. Network reachability means the machine can be contacted over the internet: if you can open a connection to it, you can send it requests. No login is needed, and the code runs as root.
That is worth pausing on. In most software, reaching a feature means first getting past a login screen, the way a staff-only door needs a key card. Here the only requirement is that the door is on the internet and open.
Finding it
The report does not describe the researcher's own discovery process. What it does describe is the surrounding evidence: the honeypot traffic since late August, and the history of the same endpoint. The author's point is that the bug is not new in kind. A patched vulnerability class is not a closed vulnerability class; if nobody watches the spot itself, something else will stand in it again.
A vulnerability class is a category of mistake, such as "runs text as code" or "trusts input from the internet". Patching one instance of a class fixes that instance. It does not remove the category from the codebase, any more than fixing one pothole removes potholes from a road. Whether the reappearance was an incomplete fix, a merge that reverted the safe version, or a reintroduced feature nobody flagged as dangerous the second time, the report does not say. A merge, in this context, is the act of combining one set of code changes into the main codebase.
Exploitation
The report gives no request, payload, command or response for this vulnerability. A payload is the actual content an attacker sends to trigger a flaw; a response is what the server sends back. It states only that anyone can send Langflow a string and Langflow will run it, unauthenticated, as root, on versions up through 1.4.2. The mechanics of the request are not shown.
What the honeypots observed is the post-exploitation interest: requests asking for the OpenAI key, the AWS secret and the contents of .bash_history. Those requests are not reproduced either. Post-exploitation means what an attacker does after getting in: the break-in is the start, and the searching comes next.
Root cause
The validate endpoint exists for a reasonable reason: developers need to test code before committing it to a workflow. The mistake is that "lets you run code" and "is reachable by anyone with a browser" ended up in the same sentence, and no hard enough line was drawn between them before it shipped. The endpoint was built under the assumption that whoever hits it is trusted by default, because in the original design they were. Then the application was containerised and shipped, and the assumption did not survive the trip. Containerised means packaged up with everything it needs to run and deployed as a unit, which makes it easy to put on a server and expose to the internet.
The earlier fix removed exec() in favour of compilation only, which is not execution. A regression is when a fix is undone, often by accident, and an old problem comes back.
Impact
An unauthenticated attacker can execute Python code as root on a reachable Langflow instance up to 1.4.2. The author argues the shell is the entry fee, not the finish line. A shell is a command line on a machine: a prompt where you type commands and the machine obeys. The real prize is every secret the container was trusted to hold, including model provider tokens, cloud access keys, database connection strings and the platform's own signing key. A token, in this sense, is a secret string that stands in for a password when one program talks to another. A database connection string is the address plus credentials used to reach a database. A signing key is a secret used to prove that something came from the platform and has not been tampered with.
The honeypot traffic is consistent with that, with attackers asking for OpenAI and AWS credentials and shell history.
The report places this in a wider pattern: twelve separate exploited vulnerabilities tracked across the platform in a single year, against one before 2026 started, and more than 15,000 successful exploitation attempts across a cluster of related flaws against instances left facing the open internet. Ollama, Gradio and Open WebUI have had their own incidents this year. Those are other tools in the same broad family of AI software.
Fix
The 2025 fix for CVE-2025-3248 replaced the exec() call with compilation only.
Variants to test
The author's guidance for hunting in agent frameworks, each point a concrete thing to try. These are the habits that change when the target is an AI framework rather than an ordinary website.
- Internal tooling endpoints. Look for routes that resemble leftover developer convenience, such as
/validate,/test,/previewor/debug, that were never meant to face the internet. A route is a path in a web address, the part after the site name, like/validate. The everyday comparison: a staff entrance left propped open because it was convenient for the people who worked there, and then the building was moved to a public street. - Flip the assumption about where power sits. Check whether the unauthenticated surface holds more raw capability than the authenticated one, because authentication was built for people managing agents while the exposed parts were built to let code run. In an ordinary website, the logged-out visitor is the least powerful user and you hunt for a way to climb. Here, the logged-out visitor may already be holding the keys.
- Follow the credential trail. After a successful execution, map what it reaches: environment variables, cache directories and config files. Environment variables are named values a running program can read, often used to pass in secrets. Cache directories are folders where software keeps temporary copies of things. Config files are files that hold a program's settings.
- Treat the dependency graph as attack surface. Examine vector databases, orchestration libraries, model SDKs and the CI pipelines that build and ship the application. A dependency is another piece of software your software relies on. An SDK is a toolkit for talking to a service. A CI pipeline is the automated process that builds and ships the software. Unpinned means the dependency is not locked to a specific version, so it can change underneath you.
- Prompt injection is when text that was meant to be read as content is instead obeyed as a command by an AI system. Escaping is the trick of marking text so it cannot be mistaken for a command, and there is no universally agreed way to do it for AI prompts yet.
Glossary
- Agent: an AI setup that can take actions, not just answer questions.
- Authentication: proving who you are, usually with a username and password, so the application can decide what you are allowed to do.
- AWS: Amazon Web Services, Amazon's cloud computing platform.
- AWS secret: a secret string that lets software use AWS and is billed to its owner.
.bash_history: a file on Linux that records the commands a user has typed.- Cache directory: a folder where software keeps temporary copies of things.
- CI pipeline: the automated process that builds and ships software.
- Code execution: running text as computer instructions rather than treating it as plain text.
- Compile: turn written code into a form the machine can run, without running it.
- Config file: a file holding a program's settings.
- Containerised: packaged with everything the software needs to run and deployed as a unit.
- CVE: Common Vulnerabilities and Exposures, a public catalogue number for a known security flaw.
- CVSS: a standard scoring system for how severe a vulnerability is, out of 10.
- Database connection string: the address plus credentials used to reach a database.
- Dependency: another piece of software your software relies on.
- Endpoint: a specific address inside a web application that accepts a request and does something in response.
- Environment variable: a named value a running program can read, often used to pass in secrets.
- Escaping: marking text so it cannot be mistaken for a command.
exec(): a Python function that takes text and runs it as code.- Honeypot: a decoy system made to look like a real target, so attackers reveal what they want while nothing real is at risk.
- Merge: combining one set of code changes into the main codebase.
- OpenAI key: a secret string that lets software use OpenAI's AI services and is billed to its owner.
- Payload: the content an attacker sends to trigger a flaw.
- Post-exploitation: what an attacker does after getting in.
- Prompt injection: text meant to be read as content being obeyed as a command by an AI system.
- Python: a programming language.
- Regression: a fix being undone, often by accident, so an old problem returns.
- Response: what a server sends back after a request.
- Root: the all-powerful administrator account on a Linux machine.
- Route: a path in a web address, the part after the site name.
- SDK: a toolkit for talking to a service.
- Shell: a command line on a machine where you type commands and the machine obeys.
- Signing key: a secret used to prove something came from the platform and has not been tampered with.
- String: a piece of text.
- Token: a secret string that stands in for a password when one program talks to another.
- Unpinned: a dependency not locked to a specific version, so it can change underneath you.
- Vector database: a place that stores text in a form a computer can search by meaning.
- Vulnerability class: a category of security mistake, such as running text as code or trusting input from the internet.