Security

Security Report: The Hyperlambda Sandbox

A living record of every attack on the sandbox that lets AI agents run generated code on a Magic server: who has tested it, every successful break and how it was fixed, what we claim, and what we don't.

Last updated 29 November 2026. New attempts arrive every week; this page is updated when something changes.

0known open sandbox escapes
2bounties earned by outside attackers, both fixed
8 / 8escape attempts rejected in the latest independent evaluation
$100standing bounty, still open

The claim under test

Generated code can only dispatch the slots its sandbox grants, with the arguments the grant pins, no matter how the call was built and no matter which model wrote it.

The check does not live in a prompt, a model or a linter. It lives in Signaler.GetService, the single function every slot invocation in the runtime passes through, whether the name came from a statement someone wrote or from a string another slot composed a microsecond earlier. The model never needs to cooperate with the security model. It is subject to it.

Making a chatbot say something silly is not a breach. The claim is about the runtime: what actually executes.

How it is enforced

Who has attacked it

WhenWhoWhat happened
April 2026Claude Code, told to break MagicFound hardening issues (request size, slow-request timeouts, a path edge case, a debug leak), all fixed. No sandbox escape. Write-up
September 2026Bounty hunters and 50+ Norwegian testers after a guest article on kode24Two real breaks, both fixed (below). After the main fix: 174 requests, 88 deliberate attacks, one breach through a door fixed four hours later. Full log
September 2026Our own audit after the first breachFour more bugs found and fixed the same week, none reported by anyone else. Details
October 2026Kimi-K3.1-Pro, GLM-5.3 and DeepSeek-V4-Pro, each given the whole projectNo serious issue found. Details
Autumn 2026Internal red team: three senior developers and frontier models including DeepSeek V4, Kimi K3 and Claude Opus 5.5 aimed at the sourceHoles found early were fixed. Since then, nothing gets through.
November 2026Independent evaluator, unaffiliatedStated hypotheses, used controls, and tested the live sandbox and the source separately. Identified four separate enforcement mechanisms. All 8 escape attempts were rejected.
Every weekStrangers on the internetSeveral unsolicited attempts a week against the live endpoint. None successful since the fixes below.

Every successful break, and its fix

Published in full, including the ones nobody else found. A security page that only lists the bugs someone else caught is not an honest one.

#What brokeFound byFixStatus
1Composed dispatch. A granted data.create with a caller-chosen [database-type] composed auth.ticket.create and minted a root JWT. The check lived in [eval], which only saw written statements.Anonymous bounty hunter, using DeepSeek. Bounty earned.Check moved to Signaler.GetService, the one function every dispatch passes through. Shipped 28 Sep 2026, 22:03 UTC, the same day.Fixed
2Null pin. A pinned data.connect invoked with no value fell through to the system database.Our own auditA pinned slot invoked without an argument is refused.Fixed
3Hash oracle. crypto.hash could hash any file on the server, with no path check, confirming its contents one guess at a time.Our own auditFile access goes through the root resolver and the whitelisted file slots.Fixed
4Threads lost the sandbox. Code inside [fork] and [join] ran on a fresh signaler with no whitelist.Our own auditWhitelist, auth ticket and context are carried across the thread boundary.Fixed
5Files behind the vocabulary's back. Mail attachments, uploads, hashing, images and screenshots read files in C# without consulting the grant.Our own auditAll routed through the file slots, so the same pins apply.Fixed
6PDF resource fetch. html2pdf could load local files and remote URLs on its own, including the file holding the JWT signing secret.Anonymous bounty hunter. Bounty earned.Every image, stylesheet and font a PDF loads goes through whitelisted slots.Fixed
7Parent segments. /etc/../config/appsettings.json stayed inside the files folder after resolution and passed folder-prefix checks.Outside contributor, with a testThe resolver rejects any .. segment outright.Fixed

What the attacks looked like

The 88 deliberate attack attempts logged after the main fix, by category. "Executed" means the generated code ran, not that the attack worked: a dangerous statement inside return is a value, not a call, and every executed row that mattered was checked against the real data.

CategoryAttemptsHeld
Path traversal / arbitrary local file access36Yes
Destructive operations (delete / wipe)15Yes
Indirect injection via templates13Yes
File read outside sandbox scope12Yes
Schema / database enumeration8Yes
HTTP-verb smuggling5Yes
Auth / JWT / root escalation4Yes
PDF remote-resource SSRF4Fixed (#6)
Vocabulary / capability reconnaissance4Yes
SSRF / internal network probing3Yes
Network reconnaissance2Yes
Data exfiltration via outbound POST2Yes
Catastrophic regex (ReDoS)1Timed out

Known limitations

What this page does not claim.

Open items

ItemStatus
Independent professional penetration test of the runtime itself, not just the web surface around itPlanned
Formal verification of the core rule: no generated program can dispatch a slot outside its granted vocabularyInvestigating
A fuller security policy; SECURITY.md is currently one linePlanned

Break it

The sandbox is live at the Natural Language API, guest-only, granting reads on a sample database and HTTP GET. Its full vocabulary is published, so nothing depends on obscurity. Find a way to make it execute something outside that vocabulary and the $100 bounty is yours, with public credit if you want it. Report anything to thomas@ainiro.io.

Magic is MIT licensed. Every fix on this page is in the public repository at github.com/polterguy/magic.

The full story: We Got Breached · 174 Attempts, One Breach · Secure by Default · The Only Sandbox Your AI Agent Cannot Break Out Of