Skip to content

ENH: Exploit module for Langflow Authenticated Remote Code Execution vulnerability CVE-2026-18729 - #21848

Open
rmhowe425 wants to merge 3 commits into
rapid7:masterfrom
rmhowe425:dev/cve-2026-18729
Open

ENH: Exploit module for Langflow Authenticated Remote Code Execution vulnerability CVE-2026-18729#21848
rmhowe425 wants to merge 3 commits into
rapid7:masterfrom
rmhowe425:dev/cve-2026-18729

Conversation

@rmhowe425

Copy link
Copy Markdown
Contributor

Description

This pull request adds a new exploit module that detects and exploits an authenticated remote code execution vulnerability impacting Langflow versions 1.11.1 and below

Related Issue:
Fixes #21847

Breaking Changes

None

Reviewer Notes

Verification Steps

  1. docker pull and docker run langflow, per documentation
  2. Start msfconsole
  3. Do: use exploit/multi/http/langflow_auth_rce_cve_2026_18729
  4. Do: run lhost=<lhost> rhost=<rhost> username=<username> password=<password>
  5. Do: exploit
  6. You should get a meterpreter session

Test Evidence

Environment

Field Details
Operating System Ubuntu 22.04
Target Software/Hardware langflow 1.10.0
Docker Image / Vagrant Setup langflowai/langflow:1.10.0

AI Usage Disclosure

None

Pre-Submission Checklist

  • Included a corresponding documentation markdown file in documentation/modules (new modules only)
  • No sensitive information (IP addresses, credentials, API keys, hashes) in code or documentation
  • Tested on the target environment specified in the Environment section above
  • Included RSpec tests for library changes (encouraged for lib/ changes)
  • Read the CONTRIBUTING.md and module acceptance guidelines

@rmhowe425

Copy link
Copy Markdown
Contributor Author

@bwatters-r7 when I fire this exploit I am consistently getting 3 meterpreter shells almost instantly. After a day of debugging I believe I know why.

The purpose of the api/v1/custom_component endpoint is to take Python source code for a custom component, send it to the Langflow backend, have Langflow parse/validate/instantiate the component, and return the resulting component/node information.

On the backend there is a bunch of post-processing that occurs and executes the payload multiple times. From much debugging, this appears to be the control flow that is causing multiple meterpreter sessions.

Are we okay with multiple meterpreter sessions being created?

/api/v1/custom_component
|
v
custom component API handler
|
v
Component(_code=)
|
v
build_custom_component_template(...)
|
v
eval_custom_component_code(...)
|
v
validate.create_class(...)
|
+--> compile(...)
|
+--> exec(...)
|
v
Created Component class
|
v
Inspect inputs / outputs / metadata
|
v
Build component template/node
|
v
Return node definition

@rmhowe425

Copy link
Copy Markdown
Contributor Author

Further evidence on the above:

image image image image

@rmhowe425
rmhowe425 marked this pull request as ready for review August 31, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

ENH: Exploit module for Langflow Authenticated Remote Code Execution vulnerability CVE-2026-18729

1 participant