
Proof-of-concept demonstrating argument injection leading to OS command injection in the CAI framework's find_file utility, enabling arbitrary command execution and reverse shells.
Author: Mohammed Idrees Banyamer
Country: Jordan
GitHub: https://github.com/yourusername
Instagram: @banyamer_security
This repository contains a Proof of Concept (PoC) demonstrating an argument injection vulnerability leading to OS command injection in the Cybersecurity AI (CAI) Framework.
The issue exists in the find_file utility, where user-controlled input is passed unsafely to an underlying system command, allowing arbitrary command execution.
The vulnerable function is imported from:
from cai.tools.reconnaissance.filesystem import find_file
The find_file function accepts an args parameter that is directly concatenated into a system-level find command without proper sanitization or argument validation.
This allows injection of arbitrary flags such as -exec, resulting in arbitrary OS command execution.
In autonomous or AI-agent-driven environments, this vulnerability may execute without human approval, significantly increasing its impact.
Successful exploitation allows an attacker to:
This is especially dangerous in AI-assisted security tooling, CI/CD environments, and autonomous agent workflows.
The included PoC script demonstrates the following scenarios:
Executes the whoami command via argument injection using the -exec flag.
Creates a proof marker file:
/tmp/CAI_CVE_2026_25130_PROOF
A reverse shell payload is included in the script but commented out for safety and ethical reasons.
python3 cai_find_file_rce_poc.py
If the system is vulnerable:
whoami will be displayedVerify manually:
ls -l /tmp/CAI_CVE_2026_25130_PROOF
If commands execute successfully, the vulnerability is confirmed.
The vulnerability was fixed after the following commit:
e22a1220
After applying the patch:
-exec or similar arguments should be rejectedUsers are strongly advised to upgrade immediately.
This vulnerability was discovered and responsibly disclosed by:
Mohammed Idrees Banyamer
Jordan
Instagram: @banyamer_security
GitHub: https://github.com/yourusername
This Proof of Concept is provided for educational and defensive security purposes only.
Do NOT use this code against systems you do not own or have explicit permission to test.
The author assumes no liability for misuse or damages resulting from this code.