upstash
Audited by Socket on Oct 12, 2026
3 alerts found:
Securityx2AnomalyThe code implements an intentional AI code-execution file editor rather than concealed malware. It contains a significant security risk because arbitrary model-authored Python is executed and dependencies are installed dynamically from pip. The shown fragment has no clear credential theft, exfiltration, persistence, or obfuscation, but its safety depends heavily on the isolation and policy controls of EphemeralBox and on restricting who can invoke the tool.
No direct malicious payload, credential theft, suspicious domain, persistence mechanism, or host-level command execution is present. The code intentionally executes arbitrary model-generated code in an external ephemeral sandbox, which is an expected feature but a significant security boundary. Effective safety depends on EphemeralBox isolation, network policy, secret isolation, and route-level authentication and rate limiting, none of which are fully established by this fragment.
The code is not indicative of malicious package behavior or intentional data exfiltration. It does contain significant session-security risks: unauthenticated POST accepts arbitrary identity and role claims, and the cookie omits Secure and SameSite attributes. The implementation should authenticate session creation, derive user identity and authorization claims server-side, validate the request schema, restrict returned fields, and set appropriate cookie security attributes.