In a major milestone for video game hardware security research and console reverse engineering, independent security researcher Sammy Hajhamid has demonstrated a functional, software-only partial jailbreak targeting the Switch 2 architecture. The exploit, publicly documented under the repository project name "ns2jb," establishes userland code execution on the system, unlocking the ability to run custom homebrew applications, reverse engineer and modify game software, export save data directly from internal storage, and interact directly with system hardware peripherals through Memory-Mapped Input/Output interfaces. The breakthrough represents one of the most significant public security developments for the hardware platform to date, relying entirely on software vulnerabilities without requiring physical hardware modifications, chip installations, or solder-based glitching methods.
The path to code execution relies on an unexpected entry point: the original Nintendo Switch release of SmileBasic 4, a popular interpreted programming environment developed by SmileBoom that allows users to create and execute custom applications directly on console hardware. SmileBasic has long served as a sandbox environment for novice programmers on handheld and desktop consoles, providing high-level commands to draw graphics, play audio, and process user inputs. However, because code interpreters operate as intermediary translation layers between high-level user scripts and lower-level system APIs, they inherently present a broad attack surface for security researchers probing for memory management flaws and logic errors.
Hajhamid, who is widely known throughout the security and reverse engineering communities under the online moniker Pepsipu, achieved the userland compromise through a combination of automated testing methodology, artificial intelligence, and physical test automation. According to technical documentation released alongside the project, Hajhamid leveraged OpenAI’s Codex platform to assist in analyzing and probing the internal logic of the SmileBasic 4 language interpreter. To facilitate continuous testing over an intensive two-week research period, Hajhamid constructed a custom automated testing harness connected directly to the console. The setup utilized automated hardware inputs to feed commands via USB into the running console, monitored graphical output via an HDMI capture rig to evaluate system behavior, and incorporated a smart home Bluetooth light switch mechanism configured to physically toggle power to the system whenever the console encountered a fatal hardware crash or kernel panic.
This continuous automated testing regime eventually uncovered a critical memory corruption flaw within the interpreter’s array management logic. Specifically, the test harness identified a 32-bit integer overflow vulnerability that manifests when elements are removed from a dynamically allocated array within SmileBasic. In software engineering, integer overflows occur when an arithmetic operation attempts to create a numeric value that exceeds the maximum memory boundary allocated for its integer representation. When removing items from an array in the targeted version of SmileBasic, the internal calculation tracking array length and boundary offsets wraps around improperly, corrupting internal memory tracking parameters. This boundary calculation error directly exposes an internal array pointer, granting an attacker primitive read and write access to adjacent regions of system memory previously restricted by the runtime environment.
