Skip to content
OAuth / SSO Write-up Intermediate

Security Flaws within ChatGPT Ecosystem Allowed Access to Accounts On Third-Party Websites and Sensitive Data

The write-up describes three OAuth-related flaws in the ChatGPT plugin ecosystem: ChatGPT did not verify that a user started a plugin installation, so a crafted callback link could silently install an attacker's plugin; a plugin framework issued codes for any member identifier without authentication, allowing zero-click takeover of victims' linked GitHub accounts; and some plugins failed to validate the OAuth redirect address, letting an attacker steal the victim's code via a link. Together these could give an attacker access to victims' private chat data and third-party repositories.

Aviad Carmel Follow

Published on salt.security

Unless you’ve been living under a rock for the past year or so, you’ve probably heard of generative AI platforms. Generative AI platforms were introduced to the public with the appearance of ChatGPT, a next-level AI developed by OpenAI that leverages the LLM (Large Language Model) model and makes it possible to chat…

Aviad Carmel, Security Researcher, on salt.security

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely missing binding between the OAuth authorisation request and its callback: no unpredictable state value, no authentication of the code-issuing endpoint, and no strict redirect address validation.

Impact

Attackers could read victims' private chat data and, through affected plugins, access private GitHub repositories; the first and third flaws need the victim to click a link, while the framework flaw is zero-click, and the vendor states no user data was compromised.

What the attacker needed

Victim clicks a crafted link; attacker owns a plugin; victim has installed the affected plugin; victim's email known (framework flaw)

The fix

The flaws were fixed: ChatGPT was to use a random state value, PluginLab.AI addressed the unauthenticated code endpoint, and plugin developers should strictly validate the redirect address including its path.

How it was found

  1. Send a victim a link to the ChatGPT plugin callback containing the attacker's plugin identifier and the attacker's code.
  2. The victim clicks the link and the malicious plugin is installed without confirmation.
  3. Any message the victim writes may then be forwarded to the attacker's plugin.
  4. For the framework flaw, obtain the victim's member identifier, which is a hash of their email.
  5. Install the plugin on the attacker's own account and swap in the victim's identifier when requesting a code.
  6. Use that code in ChatGPT to read the victim's private repositories.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you connect an app to another service, the service hands back a short secret code that proves who you are, a bit like a claim ticket. If the receiving side never checks that you were the one who asked for the ticket, someone else can hand you their ticket and you end up logged in as them, or they can grab your ticket and act as you. Here the ticket handling in ChatGPT and in some plugins was too loose, so attackers could take over accounts.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by Aviad Carmel

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.