CriticalCVE-2025-34291

    Langflow <= 1.6.9 CORS Misconfiguration to Token Hijack & RCE (CVE-2025-34291)

    Published Last modified In CISA KEV since Sources: SingCERT, pwn.watch, CVE.org, OSV, EUVD

    Share

    What is affected, what to do

    Langflow versions up to and including 1.6.9 contain a chained vulnerability that enables account takeover and remote code execution. An overly permissive CORS configuration (allow_origins='*' with allow_credentials=True) combined with a refresh token cookie configured as SameSite=None allows a malicious webpage to perform cross-origin requests that include credentials and successfully call the refresh endpoint.

    The vulnerability is being actively exploited; treat it as a priority. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Langflow lte *..1.6.9

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.4

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v4

    8.8

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: SingCERT, pwn.watch, CVE.org, OSV, EUVD

    92.8 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.83

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    239.17 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploitedSource: VulnCheck KEV (opens in a new tab), CSA/SingCERT How we classify
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.4 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    8.8
    CVSS v4

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.4
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    92.8 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.83
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 21 May 2026
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-346

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This is a chained flaw: a broken CORS policy plus a SameSite=None refresh cookie gives an attacker account takeover. Langflow's built-in code execution then turns that takeover directly into full host compromise. The attacker only needs a logged-in user to open a malicious page, so the instance itself doesn't have to be internet-facing. Langflow hosts usually hold LLM, database and cloud credentials, which makes them prime targets for credential theft and cryptomining. CISA reports no known ransomware use, but exploitation likelihood is very high and ranks among the top of all CVEs. Treat every production or developer-used instance as critical and patch or isolate it within 24 hours, starting with anything exposed to the internet.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Inventory: Find every Langflow deployment, including langflowai/langflow container images, the langflow pip package and the default port 7860/tcp. All versions up to and including 1.6.9 are affected. Confirm versions with pip show langflow or from the image tag.
      • Patch: Upgrade to a release later than 1.6.9. The fix is available from the vendor — look up the exact version in the vendor advisory or the Langflow GitHub release notes. Don't assume the upgrade worked; re-test CORS and cookie behaviour afterwards (see Detection).
      • Cut exposure now: Put internet-facing instances behind a VPN or zero-trust proxy, or take them offline temporarily. The attack only needs a logged-in user to visit a malicious page, so internal-only hosting reduces the risk but does not remove it.
      • Kill sessions: Rotate LANGFLOW_SECRET_KEY and restart the service. This invalidates every outstanding access_token/refresh_token pair. Then reset passwords and API keys for all Langflow users.
      • Rotate secrets: If you find any sign of abuse, treat all credentials stored in flows and Global Variables as compromised and rotate them. This covers LLM provider keys, database credentials, cloud keys and vector-store tokens.
      • Compromise assessment: For any instance that was exposed before patching, preserve evidence first: the process list, the container filesystem diff and the logs. Then rebuild from a clean image rather than upgrading in place.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Allow access to Langflow only from a dedicated admin or developer segment. Apply an egress allowlist to the host so it can reach only the LLM APIs it needs. This limits reverse shells and exfiltration after code execution.
      • Reverse proxy/WAF rule: At the fronting proxy (nginx, Traefik or WAF), drop requests to /api/v1/refresh and other /api/* paths whose Origin header doesn't exactly match your Langflow domain. Strip or overwrite responses that combine Access-Control-Allow-Credentials: true with a wildcard or reflected foreign Access-Control-Allow-Origin.
      • Configuration hardening: Where your version supports it, restrict CORS to explicit origins (for example via LANGFLOW_CORS_ORIGINS) and allow credentials only for your own domain. Set the refresh cookie to SameSite=Lax or Strict. If the application can't do this, rewrite the Set-Cookie header at the proxy.
      • Contain code execution: Run Langflow as an unprivileged user in a container with a read-only root filesystem. Don't mount the Docker socket and don't use host networking. Block the cloud metadata endpoint (169.254.169.254).
      • IAM/least privilege: Keep long-lived cloud credentials off Langflow hosts. Require separate browser profiles or hardened admin workstations for Langflow administration to reduce drive-by risk from untrusted sites.
      • Disable auto-login: Set LANGFLOW_AUTO_LOGIN=false. An instance without authentication can be exploited directly, regardless of this CVE.
    3. Runbook step 3

      Detection rules

      • Web/proxy access logs: Look for POST /api/v1/refresh carrying an Origin or Referer header from a foreign domain. KQL example: ProxyLogs | where Url has "/api/v1/refresh" and isnotempty(Origin) and Origin !has "langflow.example.com"
      • Token abuse sequence: Watch for a refresh call followed shortly by requests to code-execution or flow endpoints such as /api/v1/validate/code, /api/v1/custom_component, /api/v1/build/* or /api/v1/run/*. Treat it as suspicious when it comes from a new source IP, an unusual user agent or outside business hours.
      • EDR process ancestry: Flag python/uvicorn/langflow spawning sh, bash, curl, wget, nc, base64 or python -c. Sigma shape: ParentImage|endswith: ['/python','/python3'] AND ParentCommandLine|contains: 'langflow' AND Image|endswith: ['/sh','/bash','/curl','/wget','/nc']. On Linux, use auditd execve events whose ppid matches the Langflow process.
      • Network telemetry (Zeek/Suricata): Alert on new outbound connections from the Langflow host to unknown destinations or unusual ports, on requests to 169.254.169.254, and on large uploads that follow a refresh/validate sequence.
      • Configuration check (verification): Run curl -si -X OPTIONS -H "Origin: https://evil.example" https://<host>/api/v1/refresh. The instance is still vulnerable if the response reflects the foreign origin, or returns * together with Access-Control-Allow-Credentials: true.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    Langflow versions up to and including 1.6.9 contain a chained vulnerability that enables account takeover and remote code execution. An overly permissive CORS configuration (allow_origins='*' with allow_credentials=True) combined with a refresh token cookie configured as SameSite=None allows a malicious webpage to perform cross-origin requests that include credentials and successfully call the refresh endpoint. An attacker-controlled origin can therefore obtain fresh access_token / refresh_token pairs for a victim session. Obtained tokens permit access to authenticated endpoints — including built-in code-execution functionality — allowing the attacker to execute arbitrary code and achieve full system compromise.

    Source: CSA/SingCERT, pwn.watch, NVD (NIST), cvelistv5, OSV (Open Source Vulnerabilities), CISA KEV Catalog, ENISA EUVD, CVE.org (MITRE)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    LangflowLangflow
    • ≤ 1.6.9
    • —
    langflowlangflow
    • ≤ 1.6.9
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-346Origin Validation Error

      Class

      The product does not properly verify that the source of data or communication is valid.

      Entry at MITRE CWE-346

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    CSA/SingCERTCritical Vulnerability in Langflow (opens in a new tab)CSA/SingCERTactively exploited
    PoC-in-GitHub (nomi-sec)CVE-2025-34291-Langflow-Scanner (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-34291_cors_security_scanner (opens in a new tab)github.comPoC (publicly reported)reported, not verified

    References & sources

    • vulncheck.comadvisories/langflow-cors-misconfiguration-to-token-hijack-and-r…advisory, Third-party advisory
    • github.comLangflow Langflow — CVE-2025-34291package, Product, pwn-watch
    • obsidiansecurity.comblog/cve-2025-34291-critical-account-takeover-and-rce-vulnerabi…evidence, Technical description, Exploit
    • GitHub Security Advisoriesadvisories/GHSA-577h-p2hh-v4mvadvisory
    • crowdsec.netvulntracking-report/cve-2025-34291Third-party advisory
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291government-resource
    • NVD (NIST)NVD: CVE-2025-34291advisory, pwn-watch
    • github.comlangflow-ai/langflow/pull/10139web
    • github.comlangflow-ai/langflow/pull/10696web
    • github.comlangflow-ai/langflow/pull/9240web
    • github.comlangflow-ai/langflow/pull/9441web
    • github.compypa/advisory-database/tree/main/vulns/langflow/PYSEC-2025-78.y…web
    • pwn.watchpwn.watch: Langflow Langflow: Langflow Origin Validation Error Vulnerabilitypwn-watch
    • cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. Record modifiedVulnCheck

      Show 10 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Affected versions (publisher)added
      —
      Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2025/34xxx/CVE-2025-34291.json">CVE-2025-34291</a>
      Referenceadded
      —
      https://github.com/langflow-ai/langflow
      Referenceadded
      —
      https://www.obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform
      Referenceadded
      —
      https://www.vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce
      Referenceremoved
      https://github.com/langflow-ai/langflow
      —
      Referenceremoved
      https://www.obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform
      —
      Referenceremoved
      https://www.vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce
      —
      Reference typeremoved
      https://github.com/langflow-ai/langflow Types: Product
      —
      Reference typeremoved
      https://www.obsidiansecurity.com/blog/cve-2025-34291-critical-account-takeover-and-rce-vulnerability-in-the-langflow-ai-agent-workflow-platform Types: Exploit, Mitigation, Third Party Advisory
      —
      Reference typeremoved
      https://www.vulncheck.com/advisories/langflow-cors-misconfiguration-to-token-hijack-and-rce Types: Third Party Advisory
      —

      Source identifier: disclosure@vulncheck.com

    2. Record modifiedCISA ADP

      Show 6 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291
      Referenceadded
      —
      https://www.crowdsec.net/vulntracking-report/cve-2025-34291
      Referenceremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291
      —
      Referenceremoved
      https://www.crowdsec.net/vulntracking-report/cve-2025-34291
      —
      Reference typeremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-34291 Types: US Government Resource
      —
      Reference typeremoved
      https://www.crowdsec.net/vulntracking-report/cve-2025-34291 Types: Third Party Advisory
      —

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    One NVD translation into another language is hidden.

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2025-34291
    <a href="https://intel.neosec.eu/en/cve/CVE-2025-34291"><img src="https://intel.neosec.eu/badge/cve/CVE-2025-34291.svg?lang=en" alt="CVE-2025-34291 – NEOSEC Intel" height="20"></a>