Skip to content

feat: add Langflow CVE-2026-9198 detection module - #1660

Open
Franc-Zar wants to merge 2 commits into
OWASP:masterfrom
Franc-Zar:cve-2026-9198
Open

feat: add Langflow CVE-2026-9198 detection module#1660
Franc-Zar wants to merge 2 commits into
OWASP:masterfrom
Franc-Zar:cve-2026-9198

Conversation

@Franc-Zar

@Franc-Zar Franc-Zar commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Proposed change

This PR adds a new detection module for CVE-2026-9198, an RCE vulnerability affecting Langflow versions 1.0.0 through 1.10.0.
Tested against vulnerable and patched versions of the official langflowai/langflow Docker images.

Note: to reproduce vulnerability is mandatory to run affected versions containers with -e LANGFLOW_AUTO_LOGIN=true

Closes #1656

nettacker_cve_2026_9198

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change that fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Documentation/localization improvement
  • Test coverage improvement
  • Dependency upgrade
  • Other improvement (best practice, cleanup, optimization, etc)

Checklist

  • I've followed the contributing guidelines
  • I've digitally signed all my commits in this PR
  • I've run make pre-commit and confirm it didn't generate any warnings/changes
  • I've run make test and I confirm all tests passed locally
  • I've added/updated any relevant documentation in the docs/ folder
  • I've linked this PR with an open issue
  • I've tested and verified that my code works as intended and resolves the issue as described
  • I've attached screenshots demonstrating that my code works as intended (if applicable)
  • I've checked all other open PRs to avoid submitting duplicate work
  • I confirm that the code and comments in this PR are not direct unreviewed outputs of AI
  • I confirm that I am the Sole Responsible Author for every line of code, comment, and design decision

Signed-off-by: francesco <francesco.zaritto@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 742ac074-7bf2-439b-8466-b5031980a4d8

📥 Commits

Reviewing files that changed from the base of the PR and between 35c75df and f009695.

📒 Files selected for processing (2)
  • docs/Modules.md
  • nettacker/modules/vuln/langflow_cve_2026_9198.yaml
👮 Files not reviewed due to content moderation or server errors (2)
  • nettacker/modules/vuln/langflow_cve_2026_9198.yaml
  • docs/Modules.md

Summary by CodeRabbit

  • New Features

    • Added vulnerability detection for Langflow CVE-2026-9198, identifying potential unauthenticated remote code execution through Auto-Login.
    • Added support for checking affected Langflow services over HTTP and HTTPS on common deployment ports.
  • Documentation

    • Clarified that Langflow CVE-2025-3248 enables unauthenticated remote code execution.
    • Documented the newly added CVE-2026-9198 vulnerability.

Walkthrough

Adds a Langflow CVE-2026-9198 vulnerability module. The module chains auto-login JWT retrieval with authenticated Python code execution over HTTP and HTTPS. It also updates Langflow vulnerability documentation.

Changes

Langflow vulnerability detection

Layer / File(s) Summary
Module definition and documentation
nettacker/modules/vuln/langflow_cve_2026_9198.yaml, docs/Modules.md
Defines CVE-2026-9198 metadata and updates the CVE-2025-3248 and CVE-2026-9198 documentation entries.
HTTP and HTTPS exploit detection
nettacker/modules/vuln/langflow_cve_2026_9198.yaml
Retrieves a JWT from /api/v1/auto_login, submits Python code to /api/v1/validate/code, and validates HTTP 200 responses containing the command marker on ports 7860, 80, and 443.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Mergeability Score: 🟡 Moderate · up to f0096

This PR adds the Langflow vulnerability detection module and updates its documentation, but required repository reviews are currently failing for both changed files. It is not merge-ready until those failures are resolved or explicitly accepted by the appropriate owners.

Possibly related PRs

Suggested labels: new module

Suggested reviewers: securestep9

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the added Langflow CVE-2026-9198 detection module.
Description check ✅ Passed The description explains the new module, affected versions, testing, configuration requirement, and linked issue.
Linked Issues check ✅ Passed The module addresses issue #1656 by detecting unauthenticated Langflow RCE through the documented API endpoint chain.
Out of Scope Changes check ✅ Passed The documentation update and detection module directly support the CVE-2026-9198 module request without unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Contribution validation failed:

  • issue_reference: This PR must be linked to an issue or include a valid closing issue reference in the description.

@github-actions github-actions Bot closed this Aug 10, 2026
@Franc-Zar

Copy link
Copy Markdown
Contributor Author

Hi @securestep9, I'm sorry, I forgot to link the issue when I created the PR. It's been updated, and the pull request is ready for review.

@securestep9 securestep9 reopened this Aug 11, 2026
@securestep9

Copy link
Copy Markdown
Collaborator

@Franc-Zar please add screenshots showing the module detecting the vulnerable version

@securestep9

Copy link
Copy Markdown
Collaborator

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20022af661

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +42
- 7860
- 80

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Scope each JWT dependency to its source port

When a target answers on both candidate ports—for example, an unrelated service responds quickly on port 80 while vulnerable Langflow runs on 7860—the two concurrent auto-login requests save results under the same get_http_superuser_jwt event name. BaseEngine.process_conditions saves temporary events even when their conditions did not match, while find_temp_events selects one matching event without filtering by port, so the validation requests can receive Bearer error or a token minted by the other service and miss the vulnerability. Split the port flows into distinct dependency names so each validation request consumes the JWT from its corresponding auto-login request; the HTTPS 7860/443 flow has the same issue.

Useful? React with 👍 / 👎.

@@ -0,0 +1,148 @@
info:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Sign the reviewed commit

The reviewed commit object has no gpgsig header, so despite the checked PR declaration it is an unsigned commit. Recreate the commit with a valid signature before merging, as this repository requires every commit to be signed.

AGENTS.md reference: AGENTS.md:L33-L35

Useful? React with 👍 / 👎.

description: >
IBM Langflow OSS 1.0.0 through 1.10.0 allows unauthenticated attackers to chain
/api/v1/auto_login (mints SUPERUSER tokens to any network caller) with /api/v1/validate/code
(executes user code via exec()) to achieve full RCE on default Langflow deployments

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Describe the required auto-login configuration

The proposed change's reproduction instructions state that affected containers must be started with LANGFLOW_AUTO_LOGIN=true, but this description says the chain works on default deployments. Because this text is exposed as the module's CLI metadata, it overstates which installations are exposed; describe the vulnerable case as deployments with auto-login explicitly enabled.

Useful? React with 👍 / 👎.

ssl: false
json:
code: |
def foo(rce=exec("raise Exception(__import__('subprocess').check_output(['id'], shell=True, stderr=__import__('subprocess').STDOUT).decode())")):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use an OS-independent execution marker

On vulnerable Langflow installations running natively on Windows or another environment without the Unix id utility, the injected Python executes but check_output(['id'], shell=True, ...) only raises a command-not-found error, which cannot satisfy the later uid=... response regex. This produces a false negative even though arbitrary Python execution succeeded; raise a fixed marker from Python itself and match that marker instead. The duplicated HTTPS payload has the same limitation.

Useful? React with 👍 / 👎.

@Franc-Zar

Franc-Zar commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Hi @securestep9, I have addressed the first round of review:

  • I separated the default port scan into separate steps, varying the schema accordingly
  • I added the auto-login condition explanation in the module description
  • I moved from id cmd to an OS-independent echo of a custom string ("OWASP-NETTACKER-CVE-2026-9198") and validated the RCE payload against a Windows instance for completeness
  • I updated the screenshot to demonstrate the latest module output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Module-request] CVE-2026-9198 (RCE in Langflow)

2 participants