Latest News

A Three-Person Team Used Claude Opus 5 to Reach OpenAI's Internal Monorepo — and the Real Lesson Isn't the Image Bug

Rushil ShahRushil Shah
8 min read
Share

Three researchers turned a forum image upload into a pull request in OpenAI's internal monorepo in under 72 hours. Opus 4.8 couldn't finish the exploit; Opus 5 did, hours after release. The uncomfortable part isn't the memory bug — it's that agent connectors turned one forum compromise into repo access, and nobody detected it.

TL;DR

Hacktron AI, a three-person team, chained a heap overflow in libheif (reached by uploading a HEIF image to OpenAI's Discourse forum) with an OpenAI SSO misconfiguration to take over employee ChatGPT and Codex accounts, then used a victim's Codex to open a pull request in OpenAI's internal monorepo — start to finish in under 72 hours. The detail that should change your planning: Claude Opus 4.8 failed to produce a reliable exploit across multiple sessions, and Opus 5 succeeded within hours of its release. If your threat model rests on "current models can't chain that," it has an expiry date you don't control.

What actually happened

On July 25, 2026, researchers at Hacktron AI reported that they had compromised multiple OpenAI employees' ChatGPT accounts and, through them, reached internal OpenAI repositories. To prove access without reading anything sensitive, they instructed a compromised employee's Codex to open a pull request in OpenAI's internal monorepo, then stopped. TechCrunch reported that OpenAI paid a $6,500 bounty and has since resolved the issues.

The entry point was boring on purpose. OpenAI's community forum runs Discourse; Discourse's image checker didn't support HEIF, so it handed those files to ImageMagick's magick command for conversion, which exposed the underlying libheif parser to attacker-controlled input. Inside that parser was a heap buffer overflow reachable during HEIC decoding.

The chain, in the order it fell

1
HEIF upload to a public forum

An ordinary user action on community.openai.com routes the file into ImageMagick, then into libheif.

2
Heap overflow → RCE

Out-of-bounds read/write primitives during decoding give remote code execution and admin access on the Discourse host.

3
SSO identity flaw

"Sign in with OpenAI" through auth.openai.com meant control of the forum server converted into control of user identity.

4
ChatGPT / Codex account takeover

Including accounts belonging to OpenAI employees, with no victim interaction required.

5
Connected GitHub → internal repos

One employee's Codex was connected to OpenAI's GitHub org. The agent opened the PR on the researchers' behalf.

<72 hrs From initial discovery to internal OpenAI repo access Source: Hacktron AI, 2026
<$3,000 Total token spend for the wider two-month campaign across multiple targets Source: Hacktron AI, 2026
1–2 days Typical time to adapt the exploit to each new company Source: Hacktron AI, 2026
$6,500 Bounty paid by OpenAI for the disclosure Source: TechCrunch, 2026

The model-upgrade datapoint, read honestly

The headline everyone is repeating is that Opus 5 did what Opus 4.8 couldn't. That's accurate, and it's worth being precise about the delta. Per Hacktron, Opus 4.8 found the missing backport and built a working exploit with ASLR disabled. What it failed at, across several sessions, was making that exploit reliable against Discourse's default configuration with ASLR on. In Hacktron's words: "Opus 4.8 struggled across several sessions to produce a working exploit with ASLR enabled." The evening Opus 5 shipped, a fresh session produced a working ARM64 exploit in about three hours, then ported it to the x86-64 and jemalloc environment Discourse uses.

So the step wasn't discovery. It was operationalization — the expensive, expert-scarce part of exploit development, the part that historically kept public bugs from becoming everyone's problem. That's a narrower claim than "Opus 5 hacks things," and a scarier one for defenders, because operationalization is precisely the cost curve that protected ordinary companies.

One anecdote across two models is not a benchmark. Different sessions, different prompts, accumulated context from prior attempts, and a vendor with a commercial interest in the result all argue for caution. But Hacktron reports a second jump in the same campaign — from Opus 5 to GPT-5.6 Sol — when exploiting blind, knowing nothing about the target beyond that it was vulnerable. Two steps in one research programme is a trend line, not noise.

For $200 a month, anyone can use these tools and hack into a company like OpenAI.

— Matt Fredrikson, CEO, Gray Swan, TechCrunch

The part that isn't about image parsing

If you take one operational lesson from this, don't make it "patch libheif." Hacktron is explicit that the escalation was not Discourse-specific — it was an OpenAI SSO issue, and compromising any first- or third-party service behind that SSO would have produced the same access. Discourse was just the door that happened to be unlocked.

That is the shape of the problem for anyone deploying agents. A Codex or ChatGPT account isn't a chat window; it's a credential aggregator. GitHub, Slack, email, internal tools — every connector a user attaches expands what one session token is worth. The agent then executes instructions on that user's behalf, with that user's authority, and every action looks like legitimate activity from a legitimate account. Session hijack plus connectors equals lateral movement with clean audit logs.

!

Treating agent connectors as a productivity feature rather than a privilege grant

Connectors get enabled org-wide because they make the assistant useful. Nobody models what an attacker holding a single session token can do with write access to a source repo, a Slack workspace, and a mailbox at once. The forum that shares your SSO is now part of your source-control blast radius.

Fix: Inventory every connector by scope, not by name. Force read-only by default for code hosts, require a separate re-auth for write actions, and make sure low-trust properties (forums, marketing sites, status pages) sit behind a different identity provider or at minimum cannot mint tokens that reach production systems.

The CVE gap your scanner can't see

The libheif bug had already been fixed upstream. The commit wasn't labelled a security fix and received no CVE, which is Hacktron's explanation for why Debian 12 and 13 never got the backport in time — and why Discourse's Docker image shipped the vulnerable version. Discourse later published GHSA-vhm9-85gw-x335 (CVE-2026-32882) and added ImageMagick sandboxing as defense in depth.

If your vulnerability management is CVE-driven — and almost everyone's is — a silently fixed memory bug in a transitive dependency is invisible to you by construction. Hacktron's own patch guidance is worth repeating: a web-interface update may not replace the underlying container image; a rebuild is required. "We're patched" and "we redeployed the image" are different sentences.

AssumptionWhat this incident showedWhat to do instead
No CVE means no riskAn unflagged upstream fix left distro packages exploitable for monthsTrack upstream release cadence for parsers you expose to user input, not just advisories
Current models can't chain thisThe capability arrived overnight with a point releaseRe-run red-team suites on every frontier model bump; date-stamp your threat model
Low-trust properties are low-riskA community forum shared SSO with ChatGPT and CodexSegment identity by trust tier; audit token scope across every SSO relying party
We'd notice an attackOnly one company detected the activity despite repeated decoder crashesAlert on image-processor crash loops and anomalous agent-initiated writes

Nobody saw it coming, literally

The quietest line in the Hacktron writeup is the most damning: across the broader campaign, they say they're not aware of any company that detected the activity except Shopify — even after thousands of images were sent and image processors repeatedly crashed. Segfaulting decoders are one of the cheapest intrusion signals available, and they were being thrown away as noise. If you run a media pipeline, crash telemetry from your converters belongs in your SIEM this week, not next quarter.

What to actually do

Four concrete moves, in the order I'd sequence them for a team running agents in production:

1. Map the untrusted-input-to-parser paths. Any endpoint accepting .heic, .heif, or .avif is in scope. Disable decoding you don't need, restrict accepted formats in ImageMagick's security policy, and isolate what remains in ephemeral sandboxes.

2. Re-scope agent connectors. Treat every OAuth grant to an AI assistant as a standing credential with the same review you'd give a service account.

3. Make model upgrades a change-control event. When a frontier model ships, your attacker's capability changed without your architecture changing. Re-run the red-team suite against the new model — both as attacker and as the model powering your own agents. We build this into integration engagements for exactly this reason.

4. Instrument the boring signals. Decoder crashes, unusual PR authorship, agent sessions acting outside normal hours.

The honest caveats

Hacktron sells AI security tooling; this is disclosure and marketing at once, and the campaign it advertises spans more targets than OpenAI. The researchers are elite CTF operators, not a median attacker. They're candid that this was not fully autonomous hacking and that skilled human guidance remained important. And the bounty came with a pointed footnote from OpenAI: testing against the Discourse-hosted forum was explicitly excluded from the bug bounty program, and the award recognises the OpenAI-side finding rather than the actions against Discourse. That is a scope dispute worth noticing — the industry has not settled who owns risk when a third-party property shares your identity plane.

None of that undoes the core result. As Hacktron founder Mohan Pedhapati put it on X, "AI is reducing the amount of scarce expertise needed to develop exploits." The defensive implication is unglamorous: your dependency hygiene and your identity boundaries now have to hold against attackers who rent expertise by the month. If you want a second pair of eyes on where your agent deployments actually grant authority, start here.

Frequently Asked Questions

Did attackers actually read OpenAI's source code?

No. Hacktron says it deliberately avoided accessing internal code. To prove the access existed, the team prompted a compromised employee's Codex to open a pull request in OpenAI's internal monorepo, then ceased testing at approximately 15:30 UTC on July 25 and reported the findings. OpenAI confirmed a fix roughly 14 hours after the initial Bugcrowd submission.

Is my company affected by the libheif bug?

If your application processes user-supplied images and accepts HEIC, HEIF, or AVIF files, treat it as likely affected until proven otherwise. Hacktron notes the issue spans multiple libheif release families rather than one version. Update libheif and libde265 through your distribution's security channel, and if you self-host Discourse, rebuild the container image — a web-interface update alone may not replace the underlying dependency.

Why does the Opus 4.8 versus Opus 5 detail matter so much?

Because it shows offensive capability arriving in steps tied to release dates rather than drifting slowly. Opus 4.8 found the missing backport and built an exploit with ASLR disabled but could not make it reliable with ASLR on. Opus 5 solved that within hours of release. Any security assumption of the form "models can't chain this yet" therefore has an expiry date set by someone else's ship schedule.

What should teams running AI agents change first?

Audit connector scope. The escalation here worked because a compromised assistant account carried a live GitHub connection, so the agent could act with the employee's authority. Make write access to code hosts require separate re-authentication, default connectors to read-only, and confirm that low-trust web properties sharing your SSO cannot mint tokens reaching production systems.

How would we even detect an attack like this?

Most targets in Hacktron's wider campaign did not — the team says only Shopify noticed, despite thousands of malformed images and repeated image-processor crashes. Crash loops in media converters are a cheap, high-signal indicator. Pipe decoder segfaults into your monitoring, alert on unexplained spikes in upload failures, and flag agent-initiated writes to repositories that fall outside a user's normal pattern.

AI securityagent deploymentOpenAIAnthropicvulnerability disclosuresupply chain securitySSOred teaming

Published

AI-assisted writing · Reviewed by the Twarx research team

Share:
Share

Research digest

AI Research Briefing

Honest insights on AI agents, Small Language Models, and local RAG. No hype. Only when we have something worth sending.

  • No hype, just measurable outcomes
  • Read by 2,400+ engineers
  • Unsubscribe anytime