fix: remove 'or True' bypass in AuthorizationMiddleware#312
fix: remove 'or True' bypass in AuthorizationMiddleware#312Joshua-Medvinsky wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the LLMStack Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: FailSafe Researcher <joshua@getfailsafe.com>
aae183d to
420472f
Compare
|
Hi maintainers 👋 This vulnerability was found by FailSafe — a top agentic cybersecurity company specializing in automated deep security analysis of AI/ML and agentic codebases. We're reporting these initial findings as a social good contribution to help secure the open-source AI ecosystem. If you'd like us to perform a deeper, more comprehensive security scan of your project, we'd love to hear from you — reach out at joshua@getfailsafe.com. Thanks for maintaining this project! 🙏 |
|
Hi! Friendly follow-up on this security fix. Happy to adjust the approach if you have concerns about backwards compatibility, tests, or scope. If you'd prefer a different disclosure channel such as private vulnerability reporting or a security contact, I can resubmit there. |
Problem
The
AuthorizationMiddlewarecontainsor Truein the signature verification condition, making it always truthy. Combined with the baseAppTypeInterface.verify_request_signature()which returnsTrueunconditionally, all POST requests to/api/apps/*/runbypass signature verification. An unauthenticated attacker can invoke any app's run endpoint directly.Fix
Remove
or Truefrom the condition inauthorization_middleware.pyline 30. This restores the intended behavior: only requests with valid Discord or Slack signatures proceed to verification; other requests pass through without triggering the verification block.Test Plan
/api/apps/*/runare no longer forced into the signature verification blockSecurity Note
Severity: Critical — This allows unauthenticated invocation of any LLMStack app endpoint, potentially exposing LLM API keys, user data, and app outputs.