XNews

Security Researchers Use Claude to Hack OpenAI

Security Researchers Use Claude to Hack OpenAI

Three security researchers from Hacktron used Claude Opus 5 to chain two vulnerabilities, taking over multiple OpenAI employee ChatGPT accounts via a malicious image uploaded to the OpenAI community forum. They then had the compromised Codex submit a harmless PR to OpenAI's internal monorepo. The entire attack cost less than $3,000 in token fees and was completed within 72 hours of initial discovery.

Key insights

Attack Chain: From Image Upload to Codex PR

The entry point was the OpenAI community forum (Discourse). When users upload HEIC images, Discourse passes them to ImageMagick, which uses libheif. A heap overflow vulnerability in libheif (patched upstream but not backported to Debian 12, used by Discourse Docker images) allowed arbitrary code execution via a crafted image. The forum supported 'Login with OpenAI account', and OpenAI's SSO had a misconfiguration that allowed takeover of any forum user's ChatGPT and Codex accounts without user interaction. The compromised employee's Codex had access to OpenAI's GitHub organization, enabling a PR submission.

Claude Opus 5's Role and Previous Limitations

Researchers started July 23 using Opus 4.8 to review Discourse's libheif; found the unpatched vulnerability. On July 24, they wrote exploit code that worked with ASLR disabled but failed with ASLR enabled. That night, Anthropic released Opus 5. A new session with Opus 5 succeeded within 3 hours on a local Mac, and by July 25 6 AM it worked on the Discourse environment. Claude then autonomously attacked the researchers' own Discourse Cloud instance, achieving success by 10 AM. Notably, Opus refused to write exploit code for real remote targets; researchers disguised their test instance as a CTF challenge to bypass restrictions.

Cost and Timeline

The $3,000 token cost covers the entire 'HEIF Heist' project over two months targeting Slack, Zoom, Meta, and others. The OpenAI portion took only a few days of agent work plus a few hours of human time. Adapting the exploit to a new company typically takes 1-2 days. Researchers note that switching from Opus 5 to OpenAI's GPT-5.6 Sol produced a noticeable capability improvement in similar scenarios.

Response and Bounty

OpenAI confirmed fix within ~14 hours of receiving the report. Discourse fixed within days, added sandboxing for image processing, and published a security bulletin July 28. OpenAI paid $6,500 bounty on September 1, noting the forum was explicitly excluded from the bounty program, so payment was only for the OpenAI-specific part.

Source posts