CVE-2025-3248: Langflow Unauth RCE
Langflow before 1.3.0 (and `langflow-base` before 0.3.0) lets an unauthenticated attacker run arbitrary Python through the `/api/v1/validate/code` endpoint. CISA lists it as exploited in the wild, and it is tied to ransomware use. Upgrade to 1.3.0, or keep the instance off untrusted networks.
Published Jun 17, 2025 · Updated Oct 27, 2026 · Analysis Nov 17, 2026
What an attacker can do
The /api/v1/validate/code endpoint checks user-supplied Python by parsing it with ast and then calling exec. Imports are checked, and function definitions are compiled and executed. Defining a function does not run its body. But decorators and default argument values are evaluated at definition time. A payload placed in either one runs during validation, even though the function is never called.
The attacker sends one POST request with a JSON body whose code field holds such a function. No login is needed on affected versions. Horizon3 showed a variant that raises an exception carrying command output, so the result comes back in the HTTP response. The code runs as the Langflow process. That gives the attacker the API keys and model provider credentials stored in flows, files on the host, and a foothold on the network. The fix puts the endpoint behind authentication. It does not remove the code execution path, and logged-in users can still run code by design.
Who is affected
Affected: langflow below 1.3.0 and langflow-base below 0.3.0, on pip. Any instance whose port is reachable by an attacker is at risk, including internet-facing ones. Check both packages:
pip show langflow
pip show langflow-baseFor containers, check the image tag. Anything that reaches the Langflow API without a login counts as exposed.
langflow
- Ecosystem
- PyPI
- Affected
- < 1.3.0
- Fixed in
- 1.3.0
- Check
pip show langflow
langflow-base
- Ecosystem
- PyPI
- Affected
- < 0.3.0
- Fixed in
- 0.3.0
- Check
pip show langflow-base
How to fix it
Upgrade to langflow 1.3.0, and langflow-base 0.3.0 if you install it directly:
pip install --upgrade langflow==1.3.0The patch requires authentication on the vulnerable endpoint. Horizon3 also advises restricting network access to the instance. Keep Langflow off the public internet, behind a VPN or an authenticating proxy.
CISA's required action: apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or stop using the product if no mitigation is available. The due date was 2025-05-26. It binds US federal agencies. Others should treat it as overdue.
CISA required action: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
How to tell if you were hit
Search web or proxy logs for POST requests to /api/v1/validate/code from outside addresses, especially without an auth header. Inspect the request bodies for function definitions with unusual decorators or default arguments. On the host, look for child processes of the Langflow Python process such as sh, curl or wget, and for new files or cron entries. Rotate API keys stored in Langflow if you saw such requests. CISA marks it as used in ransomware campaigns.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Langflow versions prior to 1.3.0 are susceptible to code injection in the /api/v1/validate/code endpoint. A remote and unauthenticated attacker can send crafted HTTP requests to execute arbitrary code.
Credited to chximn-dt.
Questions
- Is CVE-2025-3248 exploited in the wild?
Yes. CISA added it to the Known Exploited Vulnerabilities catalog on 2025-05-05, with a due date of 2025-05-26, and flags known ransomware use.
- Does the attacker need to log in?
No. On versions before 1.3.0 the
/api/v1/validate/codeendpoint accepts requests without authentication. The CVSS vector is network, no privileges, no user interaction.- Does 1.3.0 remove the code execution?
No. According to Horizon3 the patch puts the endpoint behind authentication. Authenticated users can still run code by design, so do not expose Langflow to untrusted users.
References
Read for this analysis:
- https://github.com/advisories/GHSA-rvqx-wpfh-mfx7
- https://www.horizon3.ai/attack-research/disclosures/unsafe-at-any-speed-abusing-python-exec-for-unauth-rce-in-langflow-ai
- https://github.com/langflow-ai/langflow/security/advisories/GHSA-rvqx-wpfh-mfx7
- https://nvd.nist.gov/vuln/detail/CVE-2025-3248
- https://github.com/langflow-ai/langflow/pull/6911
- https://github.com/langflow-ai/langflow/commit/faac4db133de32fcb6d483fa9ff52f40ce42bdc0
- https://github.com/langflow-ai/langflow/releases/tag/1.3.0
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-3248
- https://www.vulncheck.com/advisories/langflow-unauthenticated-rce
- https://github.com/pypa/advisory-database/tree/main/vulns/langflow-base/PYSEC-2026-380.yaml
- https://pypi.org/project/langflow-base
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More Langflow vulnerabilities
All Langflow entriesCVE-2026-105697
Langflow: OS command injection (RCE) via arbitrary command in MCP stdio server configuration
critical9.9Oct 7, 2026CVE-2026-105698
Langflow : Cross-user flow access and vertex execution via deprecated /api/v1/build/{flow_id}/vertices endpoints
medium5.4Oct 7, 2026CVE-2026-105699
Langflow has Authenticated Cross-Project File Disclosure via Unscoped MCP Resource Handlers
high7.1Oct 7, 2026CVE-2026-105741
Langflow: IP Spoofing Bypass via `X-Forwarded-For` Allowing Remote Configuration Write
high7.1Oct 7, 2026CVE-2026-10561
Langflow: PythonREPLComponent executes unsandboxed Python code, enabling authenticated RCE and privilege escalation
critical9.9Oct 6, 2026GHSA-j8f7-x8jm-wmm4
Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling)
medium6.3Oct 6, 2026
