Skip to content

[Bounty proposal] security: omi-google-calendar-app reflects raw error into OAuth-callback HTML (reflected XSS, no preconditions) + uid attribute sinks ($75 proposed) #14580

Closed

Description

@t3ratech

Symptom

plugins/omi-google-calendar-app/main.py has two unauthenticated routes that render client-controlled input into HTML with no encoding.

1. GET /auth/google/callback — reflected XSS with no preconditions.

https://<gcal-app-host>/auth/google/callback?error=%3Cscript%3Ealert(1)%3C/script%3E

returns a 400 page whose body is

<p><script>alert(1)</script></p>

so the script runs on the plugin's origin. error is Query(None) and the if error: branch is the first thing the handler does — no code, no state, no session, no prior OAuth attempt is required. Anyone who can get a victim to open the URL gets script execution.

2. GET / — uid reflected into attributes.

uid reaches two href attributes and a hidden input:

<input type="hidden" name="uid" value="{uid}">
<a href="/disconnect?uid={uid}" class="btn btn-secondary btn-block">

A uid of "><script>alert(1)</script> breaks out of the attribute. A benign & or # corrupts the query instead. The disconnected branch renders for any uid that has no stored tokens — every attacker-chosen value.

Evidence

On current main the module imports no escaping helper at all: no html, no quote. main.py:1084 is the <p>{error}</p> sink; main.py:1021/1035/1163 are the uid sinks; main.py:1197/1214 are RedirectResponse targets built with a raw uid.

Relationship to #13658 and #14579

#13658 fixes this class across six apps (omi-clickup-app, omi-github-app, omi-notion-app, omi-slack-app, omi-twitter-chat-tools-app, omi-whoop-app); #14579 covers omi-dropbox-app. omi-google-calendar-app is not in either set. Its callback-error sink is also a step worse than the uid cases: it needs no valid state at all.

Acceptance criteria

  1. error on the OAuth callback page is HTML-escaped.
  2. uid is percent-encoded (quote(uid, safe="")) everywhere it reaches a URL, and escaped where it lands in an attribute value.
  3. /?uid=abc123 still renders /auth/google?uid=abc123; ?error=access_denied still displays access_denied.
  4. A registered hermetic regression suite proves red→green against the pre-fix module.

Fix

PR #14581 — implemented in the same session as this report, so this is not an unclaimed specification.

Bounty

$75 proposed, matching #14578 (the same class in omi-dropbox-app). Comparables: #14350 proposes $25 for a single reflected-XSS sink in omi-twitter-app; the current plugin security batch (#14430, #14442, #14444, #14446, #14451, #14453) is proposed at $150–$200. This one is an unauthenticated reflected XSS reachable with a bare query string, plus three uid sinks, with a registered regression suite. Your number is the number.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions