CVE-2026-141517 — Aws Strands Box — CWE-41 · CWE-367
Improper resolution of path equivalence in the private state protection of Strands Box before 0.2.0 on macOS might allow a local actor who controls a sandboxed workload to run code as the invoking user outside the sandbox via an operator filesystem grant that reaches the box's private state through an alternate path spelling, combined with replacement of the containment helper when a later launch rebuilds it. To remediate this issue, users should upgrade to version 0.2.0 or later.
Improper resolution of path equivalence in the private state protection of Strands Box before 0.2.0 on macOS might allow a local actor who controls a sandboxed workload to run code as the invoking user outside the sandbox via an operator filesystem grant that reaches the box's private state through an alternate path spelling, combined with replacement of the containment helper when a later launch rebuilds it. To remediate this issue, users should upgrade to version 0.2.0 or later.
🎯 What is this vulnerability?
This vulnerability is a Sandbox Escape flaw in Strands Box (a macOS sandboxing utility) prior to version 0.2.0. It stems from CWE-41 (Incomplete Capture of Filename for Path Traversal) and CWE-367 (Time-of-check Time-of-use Race Condition).
The core technical failure is in the Private State Protection mechanism. Strands Box uses macOS sandbox profiles (likely via sandbox-exec or similar entitlements) to isolate workloads. The vulnerability arises from two compounding issues:
1. Path Equivalence Bypass: The sandbox policy checks for access to "private state" directories using specific path strings. However, it fails to normalize or resolve alternate path spellings (e.g., .., symbolic links, or different mount points) that resolve to the same physical location. An attacker can craft a path that bypasses the deny rule by using an alternate spelling that the policy engine does not recognize as the protected path, even though the OS resolves it to the protected location.
2. Containment Helper Replacement (TOCTOU): The sandbox relies on a "containment helper" process or binary to enforce additional restrictions. There is a race condition where, if the sandbox is rebuilt or relaunched, the helper can be replaced by an attacker-controlled binary before the new sandbox instance fully initializes its checks. This allows the attacker to swap the legitimate helper with a malicious one that grants broader permissions or disables the sandbox entirely.
The result is that a local user (or a compromised sandboxed workload) can execute code with the privileges of the invoking user, effectively escaping the sandbox.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Target Identification: The attacker identifies that the victim is running macOS with Strands Box installed. This can be done via: * Local user enumeration (
- Version Check: The attacker determines the version is < 0.2.0 by checking the application's
Info.plistor version string in the binary. - Grant the sandboxed process broader filesystem access.
- Disable the sandbox enforcement entirely.
- Execute arbitrary code as the invoking user.
ps aux | grep strands).
* Checking for the presence of Strands Box binaries in /Applications or ~/Library/Application Support.
* Monitoring for sandbox profile files (.sb or .plist) associated with Strands Box.
2. Exploitation
The attack requires two steps: bypassing the path check and replacing the helper.Step A: Path Equivalence Bypass
The attacker crafts a file access request using an alternate path spelling that resolves to the private state directory but is not explicitly denied by the sandbox profile. For example, if the private state is at /Users/victim/.strands/private, the attacker might use a path like /Users/victim/..//Users/victim/.strands/private or a symbolic link created in a writable directory that points to the private state.
Step B: Containment Helper Replacement (TOCTOU)
The attacker monitors for a relaunch event of the sandboxed workload. When the workload is relaunched, there is a brief window where the old sandbox is torn down and the new one is being set up. During this window, the attacker replaces the legitimate containment helper binary (e.g., /usr/local/bin/strands-helper) with a malicious version. The malicious helper is designed to either:
Illustrative PoC (Conceptual):
Note: The exact binary names and paths are illustrative based on typical macOS sandboxing structures. The actual implementation depends on Strands Box's internal architecture.
# 1. Create a malicious helper that disables sandbox restrictions
cat > /tmp/malicious_helper.sh << 'EOF'
#!/bin/bash
# This script mimics the legitimate helper but removes sandbox restrictions
# In a real exploit, this would be a compiled binary that manipulates
# the sandbox profile or uses setuid to escalate privileges.
echo "Sandbox disabled by malicious helper"
exit 0
EOF
chmod +x /tmp/malicious_helper.sh
# 2. Monitor for relaunch and replace the helper
# This is a race condition exploit. The attacker must replace the helper
# between the time the sandbox is torn down and the time it is re-initialized.
while true; do
if ! pgrep -f "strands-helper" > /dev/null; then
# Helper is not running, likely in the relaunch window
cp /tmp/malicious_helper.sh /usr/local/bin/strands-helper
chmod +x /usr/local/bin/strands-helper
break
fi
sleep 0.01
done
# 3. Trigger a relaunch of the sandboxed workload
# This could be done by sending a signal to the process or using a UI action
kill -HUP $(pgrep -f "strands-workload")Note: The above is a simplified conceptual example. A real exploit would require precise timing and knowledge of the internal process names and file paths used by Strands Box.
3. Post-Exploitation
Once the sandbox is escaped, the attacker has code execution as the invoking user. This allows:🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade
2. Workarounds (If Upgrade is Not Immediately Possible)
deny file-read and deny file-write* as default rules, and only allow specific paths.
3. Detection
osquery or AIDE to monitor the hash of the helper binary.
* Query Example (osquery):SELECT path, hash FROM file WHERE path LIKE '%strands-helper%';Endpoint Security framework or osquery to monitor process creation.
* Query Example (osquery):SELECT pid, ppid, name, path FROM processes WHERE name LIKE '%strands%';Endpoint Security framework to monitor file read/write events.
* Event: Alert on ES_EVENT_TYPE_AUTH_OPEN or ES_EVENT_TYPE_NOTIFY_OPEN for paths containing .strands/private.⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query