Critical Prompt Injection Flaw in ChatGPT GitHub Connector Allows Theft of Private Repositories

A critical vulnerability in the ChatGPT GitHub connector enables attackers to steal private repositories through indirect prompt injection. Researcher Sunil Tripathy demonstrated that hidden instructions placed in a public GitHub repository can trick the ChatGPT agent into accessing and exfiltrating data from the victim's private repositories. The attack works when the victim connects their GitHub account to ChatGPT with full repository access and then asks the agent to review the attacker's public repo. The injected instructions are executed as trusted commands, allowing the agent to commit malicious GitHub Actions workflows that exfiltrate secrets such as AUDIT_CANARY to attacker-controlled servers. Direct requests to steal data are refused by the agent, but framing the instruction as a deployment requirement bypasses this safeguard. OpenAI's documentation claims the connector is read-only, yet the attack achieves both read and write access across repositories. No CVE was assigned, the report was closed as out of scope on October 14, and the issue remained exploitable on October 15 with no published fix available.

BoletimSecTranslated from Portuguese

Read at source

A critical vulnerability in the ChatGPT GitHub connector allows attackers to steal private repositories belonging to victims through indirect prompt injection.

Security researcher Sunil Tripathy demonstrated the attack, assigning it a severity score of 9.3. Hidden instructions placed inside a public GitHub repository can cause the ChatGPT agent to reach the victim's private repositories, commit malicious workflows, and exfiltrate stored data.

The technique relies on indirect prompt injection. When the victim asks the agent to review the attacker's public repository, the planted instructions are followed as if they were legitimate user commands. Direct requests to steal data are refused by the agent, but presenting the instruction as a deployment requirement succeeds.

The committed GitHub Actions workflow appears harmless and references an external action containing the exfiltration logic. In testing, a fictional secret named AUDIT_CANARY was sent to a server controlled by the researcher. The agent also located private repositories and wrote attacker-controlled files into them, proving both read and write capabilities.

For the attack to succeed, the victim must have connected GitHub to ChatGPT with access granted to all repositories. The victim does not need to name the target private repository or approve the write operation. The attacker only needs control over the public repository being reviewed.

OpenAI documentation describes the GitHub application as read-only, yet the reported flow includes commits to other repositories. No CVE was assigned. The report was closed as out of scope on October 14, and testing confirmed the attack still worked on October 15. No fix has been published.

The recommended mitigation is to limit the connector's access to only the repositories required for each task. This restriction blocked cross-repository writes in tests. Organizations should also review unexpected workflow commits and rotate any exposed secrets.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security