Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Add Module for CVE-2025-3248 (Langflow RCE)

Open jess-tech-lab opened this issue 8 months ago • 0 comments

Vulnerability Summary

CVE-2025-3248 is an unauthenticated remote code execution (RCE) vulnerability in Langflow (versions prior to 1.3.0). The flaw exists in the /api/v1/validate/code endpoint, which passes user-provided Python code to an exec() function without sufficient sanitization.

Why This Module Is Useful

  • High Severity (9.8): Allows full system compromise without credentials.
  • Recent Vulnerability (2025): Critical for modern AI infrastructure security.
  • Remotely Exploitable: No prior access or authentication is required.
  • Non-Destructive Detection: The module uses a "Safe-RCE" approach by triggering a controlled exception to confirm execution.

Proposed Detection Logic

The module sends a crafted JSON payload to the validation endpoint.

  • A decorator (@exec) to force immediate evaluation of the malicious payload.
  • A dummy function (def foo(): pass) to satisfy the internal parser's structural requirements.

Example Payload:

{
  "code": "@exec(\"import subprocess;raise Exception(subprocess.check_output(['id']))\")\ndef foo():pass"
}

The response is analyzed for:

  • Presence of system identifiers: Looking for the uid=[0-9]+\(.*\) pattern in the error response.
  • HTTP Response Codes: Monitoring for 200, 422 or 500 status codes which carry the exception data.

Testing

The module has been verified against a local instance of Langflow < 1.3.0, which successfully captures the id output.

jess-tech-lab avatar Mar 10 '26 20:03 jess-tech-lab