Skip to content

[Bounty proposal] security(dropbox-app): unescaped error reflection in OAuth callback, user data reflection, and raw uid parameter injection ($75 proposed) #14892

Closed as not planned

Description

@kaleidoscopeAI

Summary

plugins/omi-dropbox-app/main.py contains raw HTML and URL parameter interpolations leading to reflected cross-site scripting (XSS) and parameter injection:

  1. Unauthenticated Reflected XSS in OAuth Callback:

    • In /auth/dropbox/callback: when error or error_description query parameter is provided, it is rendered directly into the HTML response:
      if error:
          return HTMLResponse(
              f"""...<p>{error_description or error}</p>...""",
              status_code=400,
          )
      Any attacker can craft a link like https://.../auth/dropbox/callback?error=access_denied&error_description=<script>alert(document.cookie)</script> that executes arbitrary JavaScript in the victim's session.
  2. Unescaped User Information and Folder Name in Settings Page:

    • In get_home_page_html: display_name, email, and settings.get('folder_name', ...) are rendered directly into HTML text and input attributes (value="{settings.get('folder_name', ...)}") without html.escape, allowing attribute breakout and stored XSS.
  3. Unescaped Error Outputs:

    • In OAuth token exchange failure: HTMLResponse(f"Token exchange failed: {response.text}", status_code=400)
    • In OAuth exception handler: HTMLResponse(f"Error during authorization: {str(e)}", status_code=500)
  4. Unquoted and Unescaped uid URL Parameter Injection:

    • In get_home_page_html: action="/settings?uid={uid}", <a href="/disconnect?uid={uid}">, and <a href="/auth/dropbox?uid={uid}"> lack quote(uid, safe='') and attribute escaping.
    • Redirect responses in callback, disconnect, and settings endpoints (RedirectResponse(url=f"/?uid={uid}")) lack URL parameter encoding.

Fix

  1. Use html.escape for safe_msg, safe_text, and safe_err across all HTML responses.
  2. Guard callback query parameter types against Query object defaults when invoked in tests.
  3. Use quote(uid, safe='') and attribute escaping for all form actions, href targets, and redirect URLs (safe_settings_action, safe_disconnect_url, safe_auth_url).
  4. Add hermetic test suite in plugins/omi-dropbox-app/test_settings_page_encoding.py covering connect URL quoting, user info escaping, attribute breakout prevention, reflected callback error escaping, token exchange error escaping, exception message escaping, and redirect quoting (6 tests).
  5. Register dropbox-app-settings-encoding-tests and dropbox-app-client-tests in .github/checks-manifest.yaml.

Verification

All 6 new encoding tests, all 5 test_dropbox_client.py tests, and all 53 checks-manifest validation tests pass locally (100% green).

@kodjima33 @josancamon19, following the published bounty proposal process, would you approve $75 after review/merge?

PR is ready to link.

Activity

  1. kaleidoscopeAI commented on Sep 19, 2026

    @kaleidoscopeAI
    ContributorAuthor

    Opened PR #14893 with complete fix and regression test suite. Ready for review!

  2. moved this from Someday to In progress in omi TODO / bountieson Sep 19, 2026
  3. added
    intelligence
    p2
    retrieval-action
    and removed
    intelligence
    p2
    on Oct 6, 2026
  4. undivisible commented on Oct 22, 2026

    @undivisible
    Collaborator

    We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now. The fix already landed in #14579 — thanks for the fix! 🙏

  5. moved this from In progress to In review in omi TODO / bountieson Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2retrieval-action

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions