Skip to content

fix(google-calendar-app): escape error and uid reflected into OAuth callback HTML - #14435

Closed
Abhist17 wants to merge 1 commit into
BasedHardware:mainfrom
Abhist17:fix/gcal-oauth-callback-reflected-xss
Closed

Abhist17 wants to merge 1 commit into
BasedHardware:mainfrom
Abhist17:fix/gcal-oauth-callback-reflected-xss

Conversation

@Abhist17

@Abhist17 Abhist17 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Escapes two interpolated values (the error query param and uid parsed from OAuth state) in the Google Calendar OAuth callback's HTML response, closing a reflected-XSS gap. Adds a regression test. Full vulnerability details reported privately per SECURITY.md rather than in this PR description.

Fixes #14434
Failure-Class: none

…allback HTML

google_callback() interpolated the `error` query param and the `uid` parsed
out of `state` directly into HTML with no escaping. `error` is reflected
before any consent screen or stored-state check exists, so
?error=<script>...</script> against /auth/google/callback was a
zero-interaction reflected XSS. `uid` survives a real OAuth round trip (a
victim who approves consent completes it for an attacker-chosen uid) and
lands unescaped inside an href attribute on the success page.

Both are now passed through html.escape() before interpolation.

Failure-Class: none

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified line-by-line: real reflected XSS on the Google Calendar OAuth callback (error param before state verification, uid after) confirmed on main; fix is a precise html.escape() on exactly those two sinks with clear inline comments on the attack path, no auth/token logic touched. 5/5 confidence, CI fully green, regression test added. Author has 3 prior merged PRs.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5/5 confirmed real reflected-XSS fix, still DIRTY -- approve-only.

@aryanorastar aryanorastar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on 5de2c389f6dd.

plugins/omi-google-calendar-app/main.py still renders html.escape(error) without quote=True on the OAuth callback page, and Authentication error: {str(e)} is still raw HTML. Tool paths also interpolate str(e).

quote=True is required on attribute/HTML sinks. Add a test that a " / <script> error value cannot break out. Head is CONFLICTING. I am not merging.

@aryanorastar

Copy link
Copy Markdown
Collaborator

Closing because this is already on main (Google Calendar OAuth error escaping). The keep is #14581. This head does not add a unique production file.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Abhist17 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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.

[Withdrawn] Security issue reported privately (google-calendar-app)

3 participants