adventure
Audited by Socket on Apr 4, 2026
3 alerts found:
AnomalySecurityx2The documented codebase contains several high-risk patterns that enable remote or local compromise when untrusted world data or user-supplied content is used: runtime evaluation of code fields (JS and Python) allows arbitrary code execution; postMessage('*') in OAuth flows and insecure DOM insertion enable token leakage and XSS-driven exfiltration; path concatenation from merge operations enables path traversal and arbitrary file writes. These are not necessarily intentionally malicious, but they are dangerous design choices for a package that loads external worlds or runs as a web service. Immediate mitigations: avoid eval/new Function where possible or implement a strict sandbox/allow-list, restrict postMessage targets and validate origins on sender side, escape/sanitize all HTML inserted from data, sanitize file write targets and reject path traversal, stop storing secrets in localStorage or use secure vaults, and avoid including API keys in URLs. Overall, this is a high-attack-surface project with legitimate functionality but multiple actionable security issues that should be fixed before accepting untrusted inputs or running as a multi-user service.
This module contains a high-impact arbitrary JavaScript execution capability driven by registry-provided data fields (eval in resolveText/resolveObjectText and dynamic invocation of compiled guard/description functions). While this fragment does not show direct exfiltration or system-damage actions, the design removes trust boundaries: if any registry/world data is malicious or compromised, attackers can execute code in the runtime with access to the engine instance and game state. Treat as a significant supply-chain security risk unless the *_js/guard_js/description_js sources are strictly controlled, immutable, and sandboxed.
Security posture is high-risk primarily due to explicit eval() of executable strings originating from externally loaded/compiled registry content (actions and exit guards). This creates a straightforward supply-chain/data-driven in-browser RCE pathway that can enable sabotage or data exfiltration when a content pack or build artifact is compromised. Separately, the browser-side use of Bearer API keys for AI endpoints is a significant credential exposure risk if keys are real. No definite malicious payload is visible in the snippet, but the architecture provides the capability to carry out malware behavior, so it should be treated as a security alert unless the eval paths are removed or replaced with a safe, non-Turing-complete DSL with strict validation and sandboxing, and unless API keys are never shipped to the browser.