Skip to content

fix: remove 'or True' bypass in AuthorizationMiddleware#312

Open
Joshua-Medvinsky wants to merge 1 commit into
trypromptly:mainfrom
Joshua-Medvinsky:fix/find-001-auth-bypass-middleware
Open

fix: remove 'or True' bypass in AuthorizationMiddleware#312
Joshua-Medvinsky wants to merge 1 commit into
trypromptly:mainfrom
Joshua-Medvinsky:fix/find-001-auth-bypass-middleware

Conversation

@Joshua-Medvinsky

Copy link
Copy Markdown

Problem

The AuthorizationMiddleware contains or True in the signature verification condition, making it always truthy. Combined with the base AppTypeInterface.verify_request_signature() which returns True unconditionally, all POST requests to /api/apps/*/run bypass signature verification. An unauthenticated attacker can invoke any app's run endpoint directly.

Fix

Remove or True from the condition in authorization_middleware.py line 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

  • Existing test suite passes
  • Requests without Discord/Slack signatures to /api/apps/*/run are no longer forced into the signature verification block
  • Discord and Slack webhook requests with valid signatures still work correctly

Security Note

Severity: Critical — This allows unauthenticated invocation of any LLMStack app endpoint, potentially exposing LLM API keys, user data, and app outputs.

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

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>
@Joshua-Medvinsky Joshua-Medvinsky force-pushed the fix/find-001-auth-bypass-middleware branch from aae183d to 420472f Compare June 10, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant