OpenAI ChatGPT accounts compromised through forum image upload vulnerability

What the exploit chain looked like
The vulnerable code path had been changed upstream the previous year, but the commit was never documented as a security fix and received no CVE, so the backport never reached Debian 12 or Debian 13 in time.
They then ran the agent in an autonomous loop against their own Discourse Cloud instance until it achieved remote code execution, and reused the generated script to gain RCE on OpenAI’s community.openai.com instance.
From a forum compromise to ChatGPT and Codex account takeover
The forum exploit by itself did not produce an OpenAI breach. OpenAI runs its community on Discourse and enables Sign in with OpenAI through auth.openai.com. That SSO link is what made a forum compromise equivalent to a ChatGPT and Codex account takeover for any active member of the forum, including OpenAI staff. The weakness was in the identity flow, not in Discourse itself: any first-party or third-party OpenAI service authenticating through the same SSO could have produced the same access if compromised.
Once an OpenAI employee’s account was under control, the connected Codex integration to OpenAI’s GitHub organization was reachable. The attackers did not read internal code. Instead, they sent a prompt through the employee’s Codex account that opened a proof-of-concept pull request, PR #1186742, in OpenAI’s internal monorepo. That pull request was the evidence of impact. All further testing stopped the same day.
Timeline from initial finding to fix
The Discourse side ran in parallel. As a defense in depth move, Discourse added image-processing sandboxing on top of the patch. The bounty covered the OpenAI-side finding; testing against the Discourse-hosted community.openai.com was explicitly excluded from OpenAI’s bug bounty scope.
How much human and AI effort it actually took
Who detected the activity
When code execution landed inside a sandbox or restricted environment, the same AI-assisted process handled privilege escalation, lateral movement, and bypassing existing defenses.
What is affected and how to patch
The issue is not a single version. Any deployment without the latest upstream security patches is potentially vulnerable.
- Install the latest security-patched libheif and libde265 packages through your distribution’s security channel, or an upstream release.
- Distribution packages may carry backported fixes under an older upstream version, so check the package security advisory as well.
- For self-hosted Discourse, rebuild the installation from /var/discourse with git pull followed by ./launcher rebuild app. A web-interface update alone may not replace the underlying image, and older Docker images can still pull in a vulnerable libheif dependency.
- Production architectures handling untrusted user images should consider disabling HEIF and AVIF decoding where it is not needed, and isolating image-processing pipelines inside hardened, ephemeral sandboxes. ImageMagick’s security policy supports restricting accepted formats and resource usage.
What the broader research turned up
A large share of widely used software depends on this single image-processing library. Applications that process user-controlled images and accept .heic, .heif, or .avif files are likely to be affected.
The report frames the long-term lesson in terms of attacker economics. Memory-corruption bugs and even working exploits have historically been public for years without being weaponized at scale, because turning a bug into a reliable exploit required rare expertise and detailed knowledge of the target environment. AI-assisted research is compressing that work into days, which means defenders need threat models that account for the new economics of exploitation rather than relying on outdated assumptions about who can carry out a sophisticated attack.
For any business relying on AI-driven search and discovery, the practical lesson is that the integrity of the identity layer matters as much as the integrity of the app it sits in front of. A misconfigured SSO flow turned a third-party forum into a path to internal code repositories, and that is the kind of cross-product chain an audit needs to look for.
FAQ
What vulnerability was used to access OpenAI employee accounts?
That combination allowed remote code execution on community.openai.com and, through the Sign in with OpenAI SSO link, takeover of ChatGPT and Codex accounts for active forum members, including OpenAI employees.
How quickly did OpenAI fix the issue?
Which systems are affected by the libheif flaw?
Affected code is not tied to a single version. Vulnerable release families include 1.19.x, 1.20.x, 1.22.x, and 1.23.x. The HEIF Heist research traced the library through Slack, Meta, GitHub Enterprise, Ruby on Rails, and JavaScript frameworks including Next.js, Astro, and Gatsby. Applications that process user-controlled images and accept .heic, .heif, or .avif files are likely to be affected and should update to a security-patched build, with deployment-specific sandboxing where possible.