Share
## https://sploitus.com/exploit?id=3217A987-4F00-5460-8067-CF9948430C3A
# CVE-2026-9198 - IBM Langflow Unauthenticated RCE via Auto-Login Bypass (Educational PoC)

This repository provides an **educational proof of concept** for **CVE-2026-9198** affecting IBM Langflow OSS.

The PoC (`poc.py`) demonstrates how an unauthenticated attacker can chain:

1. `GET/POST /api/v1/auto_login` (returns a superuser token when auto-login is enabled), and
2. `POST /api/v1/validate/code` (executes attacker-controlled Python code)

to achieve remote code execution.

## Disclaimer

This code and the provided Docker stacks are for **local security testing and education only**.  
Do not run against systems you do not own or explicitly have permission to test.

## Repository Layout

```text
.
โ”œโ”€โ”€ poc.py
โ”œโ”€โ”€ vulnerable/docker-compose.yaml
โ””โ”€โ”€ patched/docker-compose.yaml
```

- `poc.py`: exploit PoC.
- `vulnerable/docker-compose.yaml`: lab stack using `langflowai/langflow:1.10.0` (vulnerable).
- `patched/docker-compose.yaml`: lab stack using `langflowai/langflow:1.10.1` (patched behavior target).

Both compose files are intentionally set up as **labs to test `poc.py`** on `http://127.0.0.1:9999`.

## Prerequisites

- Docker + Docker Compose
- Python 3.8+
- Python package:

```bash
pip install requests
```

## Run the Vulnerable Lab Stack

Start the vulnerable environment:

```bash
docker compose -f vulnerable/docker-compose.yaml up -d
```

Run the PoC:

```bash
python3 poc.py
```

Expected vulnerable result includes a red `[!]` line and command output similar to:

```text
[!] /api/v1/auto_login is vulnerable: uid=... gid=...
```

## Run the Patched Lab Stack

Stop the vulnerable stack first (if running):

```bash
docker compose -f vulnerable/docker-compose.yaml down -v
```

Start the patched environment:

```bash
docker compose -f patched/docker-compose.yaml up -d
```

Run the same PoC:

```bash
python3 poc.py
```

Expected patched result is a green `[-]` line indicating the exploit chain no longer succeeds.

## PoC Configuration

In `poc.py`:

- `URL` defaults to `http://127.0.0.1:9999`
- `CMD` defaults to `id`

Adjust these constants if you need to test a different local target or command.

## References

- https://nvd.nist.gov/vuln/detail/CVE-2026-9198
- https://www.ibm.com/support/pages/node/7278927
- Inspired from https://github.com/0xdak/CVE-2026-9198_exploit