Nintendo Switch 2 Jailbroken via AI-Assisted Exploit of a $25 BASIC Game
The ns2jb exploit evades Switch 2's ARM pointer-authentication defenses and already enables homebrew apps

Security researcher Sammy "pepsipu" Hajhamid released ns2jb on October 22, 2026 — the first publicly confirmed software-only jailbreak for the Nintendo Switch 2 — using OpenAI's Codex AI coding agent to discover a critical vulnerability buried inside SmileBASIC 4, a $25 BASIC interpreter game sold in Nintendo's own eShop. Within hours, Nintendo pulled SmileBASIC 4 from the store. Within a day, the homebrew community was running unauthorized Vulkan API tests and injecting characters from other franchises into Mario Kart World, a viral mod video that drew more than three million views.
The jailbreak targets firmware version 23.0.1 and requires re-running the exploit after each reboot — a limitation that distinguishes tethered exploits from permanent breaks — but it is fully functional, enables arbitrary code execution at the sysmodule level, and provides direct access to hardware peripherals via memory-mapped I/O.
How a BASIC Interpreter Cracked a Hardened Console
The exploit runs in two stages. The first stage exploits an integer overflow in SmileBASIC 4's REMOVE array command. The command computes the sum of its position and count parameters as a 32-bit signed integer without overflow checking. When that sum wraps past the 32-bit signed maximum, the resulting negative value is used as an array index, creating an out-of-bounds read/write primitive inside the game's process — the exploitation foothold that makes everything else possible.
Codex found this vulnerability. pepsipu had built a physical hardware harness using a JetKVM device — an off-the-shelf KVM relay that captures HDMI video and routes controller inputs — and connected it to a Switch 2. This let Codex treat the physical console like a software environment: receive video frames, send button sequences, observe results, and iterate. In that loop, Codex systematically tested SmileBASIC's BASIC interpreter commands and flagged the REMOVE overflow as anomalous.
The second stage targets Nintendo's fs sysmodule — a core privileged service process. A path normalization routine in IFileSystem::GetEntryType fails to handle paths containing /..\ sequences, producing a heap buffer overflow of 0x301 bytes that corrupts a BufferedStorage cache pointer. With that corrupted pointer, ns2jb achieves arbitrary read/write within fs, then swaps the ExeFS object behind the loader's IPC handle to enable arbitrary code execution as any ordinary sysmodule — bypassing Nintendo's signature chain without touching the hardware bootloader.
Why the Switch 2 Resists Standard Exploit Routes
Understanding the significance of this approach requires understanding what Nintendo changed. Earlier Switch and 3DS jailbreaks relied on return-oriented programming (ROP): attackers would locate small code sequences ("gadgets") in executable memory and chain them to run arbitrary logic, typically entering through the browser engine. The Switch 2 closes all three entry points that approach requires.
ARM Pointer Authentication Code (PAC), part of the ARMv8.3-A instruction set, cryptographically signs every function pointer with a key derived from context. A corrupted pointer fails authentication and triggers a system exception before any gadget executes. Execute-Only Memory (XOM) reinforces this by preventing code pages from being read at all — even with arbitrary memory read/write access, attackers cannot scan the executable to locate gadgets. Control Flow Integrity (CFI) type-checks IPC call sites, closing the remaining avenue for arbitrary calls from a sandboxed browser context.
The SmileBASIC route sidesteps all three. Because the exploit begins inside a native application rather than a web sandbox, it starts from a more privileged execution context where PAC constraints are less restrictive, and the heap corruption approach requires neither gadget-reading nor forged pointers.
AI in a Hardware Loop: What Codex Actually Did
pepsipu spent approximately two weeks on the security research phase. That work was not autonomous: an early attempt to give Codex a self-directed goal failed. The effective workflow placed Codex in a tightly constrained analysis loop — testing specific program behaviors, documenting results, flagging anomalies — while pepsipu directed strategy, evaluated findings, and decided which paths to pursue. The developer used roughly one additional day to build the Mario Kart World character mod with Codex once the underlying exploit was complete.
The JetKVM harness is what made the AI participation possible. By giving Codex a video feed and controller-input relay, pepsipu created a feedback loop in which Codex operated on a physical device the way AI agents typically operate on software environments. This is the most well-documented public case of a commercial AI coding agent contributing to a console jailbreak — and the methodology, not just the result, is the advance. Hardware security researchers with AI agents and an HDMI capture card now have a repeatable workflow for fuzzing physical devices that previously required entirely manual effort.
Read more: REA Brings AI Agents Into Reverse Engineering at Scale
A Familiar Exploit Vector, a New Platform
SmileBASIC's reappearance as an entry point has a clear precedent. In 2016, a stack overflow in the 3DS version of SmileBASIC enabled a 3DS jailbreak; Nintendo pulled the app from the 3DS eShop, released a patch, and eventually allowed a corrected version to return. The same application — different platform, different vulnerability class, same story arc — is repeating on Switch 2.
The larger context includes the Fusée Gelée exploit of 2018, a hardware-level vulnerability in the Switch 1's USB boot ROM that affected all original Tegra X1 units and could never be patched via firmware; units manufactured before Nintendo's hardware revision remain exploitable today. The Gezine exploit released in July 2026 achieved earlier access on both Switch 1 and 2 — a userland exploit functional across all firmware versions and usable offline — but Gezine did not reach the code execution level needed for a full homebrew ecosystem. ns2jb does.
What the Homebrew Community Can Now Do
Independent developer @eXtas1stv published a Vulkan API render test running on Switch 2 hardware within 24 hours of ns2jb's release, with functional touchscreen input confirmed — opening third-party graphics toolchains and GPU compute experiments outside Nintendo's official SDK. The ns2jb sysmodule execution level also grants memory-mapped I/O access, enabling direct hardware peripheral communication. The full scope of what researchers can extract from that access is not yet characterized.
The concern driving Nintendo's response is the piracy vector this unlocks. Sysmodule-level execution is what ultimately allows Nintendo Content Archive signature verification to be bypassed. That risk is currently tempered by the exploit's tethered nature — a jailbreak requiring a computer connection and a re-run after each reboot imposes friction that persistent exploits do not. But tethered exploits are historically a milestone, not an endpoint.
Read more: Autonomous AI Agents Breached 100+ Companies for $50 Each
Nintendo's Response and the Enforcement Calculus
Nintendo has not issued a public statement on ns2jb. Beyond delisting SmileBASIC 4, the company's enforcement posture is defined by its existing user agreement, which explicitly prohibits unauthorized modifications and states that Nintendo may permanently restrict online service access for violations. The MIG Switch piracy card triggered permanent hardware bans in 2025. In August 2026, Nintendo filed seven DMCA notices removing more than 400 Switch emulator repositories from GitHub in a single day.
The firmware patch is the near-term variable. Closing the fs path normalization vulnerability — and tightening SmileBASIC's integer handling — would limit ns2jb to Switch 2 units whose owners hold back on updates, a population that tends to stay small among players with online accounts. The underlying methodology is not patchable in the same way: Codex operating inside a JetKVM harness can be pointed at any device that outputs video and accepts input. The Switch 2 is the first gaming console publicly jailbroken with an AI agent in the research loop, and the approach will outlast whatever Nintendo ships in firmware 23.0.2.