Skip to content

ENH: CISA KEV - Exploit module for CVE-2026-33017 - #21700

Open
rmhowe425 wants to merge 13 commits into
rapid7:masterfrom
rmhowe425:dev/CVE-2026-33017
Open

ENH: CISA KEV - Exploit module for CVE-2026-33017#21700
rmhowe425 wants to merge 13 commits into
rapid7:masterfrom
rmhowe425:dev/CVE-2026-33017

Conversation

@rmhowe425

@rmhowe425 rmhowe425 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request adds a new exploit module that exploits an unauth RCE vulnerability in the /api/v1/build_public_tmp/{flow_id}/flow endpoint in Langflow versions prior to 1.9.0

Addition of CVE to CISA KEV

Related Issue:
Fixes #21698

Breaking Changes

None

Verification Steps

  1. Install the application
  2. Start msfconsole
  3. Do: use exploit/multi/http/langflow_unauth_rce_cve_2026_33017
  4. Do: run LHOST=<lhost> RHOSTS=<rhost> FLOW_ID=<flow id>
  5. A meterpreter session is initiated

Test Evidence

image

Environment

Field Details
Operating System Ubuntu 22.04
Target Software/Hardware Langflow version 1.8.4

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
rmhowe425 marked this pull request as ready for review July 23, 2026 21:15
@rmhowe425 rmhowe425 changed the title ENH: Exploit module for CVE-2026-33017 ENH: CISA KEV - Exploit module for CVE-2026-33017 Jul 23, 2026
" display_name='X'\n" \
" outputs=[Output(display_name='O',name='o',method='r')]\n" \
" def r(self)->Data:\n" \
" #{payload.encode.gsub("\n", "\n ")}\n" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's an issue with \n, would it work to add it to badchars?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I don't think so. Reason being: The payload is injected directly as Python source code rather than being placed inside a string literal. Multi-line payloads are supported intentionally, and the gsub("\n", "\n ") keeps the indentation correct so the generated method stays valid Python. Adding \n to BadChars would prevent otherwise valid payloads from working.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msutovsky-r7 Are you okay with this line of thought? Would you consider this resolved?

Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb
@rmhowe425
rmhowe425 requested a review from msutovsky-r7 July 24, 2026 14:40
@rmhowe425

Copy link
Copy Markdown
Contributor Author

@msutovsky-r7 Ready for review

@rmhowe425

Copy link
Copy Markdown
Contributor Author

Hi @adfoster-r7 I was wondering if you could help me move this PR forward?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Metasploit multi/http exploit module for unauthenticated RCE in Langflow (< 1.9.0, CVE-2026-33017), along with end-user module documentation under documentation/modules.

Changes:

  • Introduces exploit/multi/http/langflow_unauth_rce_cve_2026_33017 with an AutoCheck-based version check and a JSON POST exploit path.
  • Adds module documentation covering installation, options, and a usage scenario.

Impact Analysis:

  • Blast radius: low (new module + new documentation only; no shared library modifications identified in diff).
  • Data and contract effects: none beyond adding a new module interface/options.
  • Rollback and test focus: rollback is simple (remove the new files); validate check behavior against non-Langflow JSON responses and validate exploit request success/failure handling via HTTP status codes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb New unauth RCE exploit module for Langflow via build_public_tmp/{flow_id}/flow.
documentation/modules/exploit/multi/http/langflow_unauth_rce_cve_2026_33017.md New module documentation with setup, options, and an example run.

Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb Outdated
Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb
Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb
Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb
Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb Outdated
Comment thread modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb
@rmhowe425

Copy link
Copy Markdown
Contributor Author

@adfoster-r7 Should be good to go now

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (2)

modules/exploits/multi/http/langflow_unauth_rce_cve_2026_33017.rb:103

  • Suggestion: Problem: output_method is generated from random letters and used as a Python method name without a guaranteed-safe prefix, which can produce an invalid identifier (e.g., a reserved keyword). Impact: exploit reliability can be non-deterministic due to Python syntax errors when Langflow evaluates the injected component. Fix: Prefix the generated method name with a constant string (or otherwise ensure it cannot be a keyword).
    output_display_name = Rex::Text.rand_text_alpha(5)
    output_name = Rex::Text.rand_text_alpha(5).downcase
    output_method = Rex::Text.rand_text_alpha(5).downcase

documentation/modules/exploit/multi/http/langflow_unauth_rce_cve_2026_33017.md:55

  • Important: Problem: The Scenarios transcript’s AutoCheck output does not match what this module’s check actually prints (Exploit::CheckCode::Appears("Version #{version} appears vulnerable.")). Impact: Users following the docs may think the module is behaving incorrectly when the output differs. Fix: Update the transcript line to reflect the real AutoCheck message.
[*] Started reverse TCP handler on 127.0.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. Version 1.8.4 detected.
[*] Payload sent successfully.

@rmhowe425

Copy link
Copy Markdown
Contributor Author

All Co-Pilot suggestions have been impemented. Local retesting of exploit code is successful

image

@msutovsky-r7

Copy link
Copy Markdown
Contributor

Hey @rmhowe425 , did test your module and I got this:

msf exploit(multi/http/langflow_unauth_rce_cve_2026_33017) > set rhosts 127.0.0.1
srhosts => 127.0.0.1
msf exploit(multi/http/langflow_unauth_rce_cve_2026_33017) > set rport 7860
rport => 7860
msf exploit(multi/http/langflow_unauth_rce_cve_2026_33017) > set flow_id 9b988a63-78de-4676-afbd-e6137ec625af
flow_id => 9b988a63-78de-4676-afbd-e6137ec625af
msf exploit(multi/http/langflow_unauth_rce_cve_2026_33017) > set lhost 127.0.0.1
lhost => 127.0.0.1
msf exploit(multi/http/langflow_unauth_rce_cve_2026_33017) > run verbose=true 
[!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
[*] Started reverse TCP handler on 127.0.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. Version 1.8.4 appears vulnerable.
[-] Exploit aborted due to failure: unexpected-reply: Unexpected server reply (HTTP 403).
[*] Exploit completed, but no session was created.

Would you mind sharing more info on your environment setup? I've used the docker same as in module documentation.

@rmhowe425

rmhowe425 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@msutovsky-r7 I just finished troubleshooting your issue. FLOW_ID must be set to the value of a public flow. You can make a flow public by clicking on the Shareable Playground toggle button.

The requirement for a public flow to be used for this exploit is heavily implied in the NVD CVE description. I'm working on updating the documentation to explicitly call out that FLOW_ID must be an ID for a public flow.

Looks like the documentation that I provided in the pull request already explicitly calls out the need for FLOW_ID to be set to a public flow. Let me know if you think there need to be any revisions to the documentation :)

public flow

image

@rmhowe425

Copy link
Copy Markdown
Contributor Author

Note the Before and After in the screenshot below.

Initial attempt at exploitation failed when FLOW_ID was for a private flow. After making the flow public (screenshot in previous comment), I dropped into a meterpreter shell.

image

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: Add exploit module for unauth RCE impacting Langflow versions < 1.9.0 (CVE-2026-33017)

4 participants