CivSwitch: How a Civ VII Cartridge Jailbreaks the Switch 2

The CyberSec Guru

CivSwitch Switch 2 jailbreak

If you like this post, then please share it:

Buy me A Coffee!

Support The CyberSec Guru’s Mission

🔐 Fuel the cybersecurity crusade by buying me a coffee! Why your support matters: Zero paywalls: Keep the main content 100% free for learners worldwide.

“Your coffee keeps the servers running and the knowledge flowing in our fight against cybercrime.”☕ Support My Work

Buy Me a Coffee Button

For most of the last decade, console makers have leaned on one basic assumption: if a game is dangerous, you can delete it. A vulnerability shows up in a digital title, the platform holder pulls it from the eShop or PlayStation Store, pushes a mandatory update, and the hole closes. That assumption held in late October 2026, when security researcher Sammy Hajhamid (known online as pepsipu) published ns2jb, a tethered userland jailbreak for the Nintendo Switch 2 built around SmileBASIC 4, a programming app from the original Switch’s eShop. Nintendo’s response was immediate and simple: it delisted SmileBASIC 4, cutting off the exploit’s entry point for anyone who hadn’t already downloaded it.

Seven days later, a developer who goes by Gezine showed why that strategy stops working the moment a console supports physical backward compatibility. Gezine released CivSwitch, a toolchain built around a cross-site scripting bug in the original Nintendo Switch 1 cartridge release of Sid Meier’s Civilization VII, and it runs on the Switch 2 through the console’s backward-compatibility layer. Because the flaw lives on a pressed game card rather than a server Nintendo controls, there is no delisting that fixes it. The response this time came from the publisher instead: 2K Games reportedly told major retailers, Amazon included, to cancel pending orders and pull physical Switch 1 copies of Civilization VII, citing “technical and security-related requirements,” and to offer buyers a patched digital code-in-box edition instead.

Sid Meier's Civilization VII
Sid Meier’s Civilization VII

What CivSwitch does

CivSwitch gives an attacker, or more accurately a console owner, code execution inside the sandboxed userland process that Civilization VII runs in. It does not break Horizon OS’s kernel, bypass the console’s code-signing checks, or let anyone install and run pirated Switch 2 games. What it does is open a door that didn’t exist before: an offline, physical, unpatchable way to get arbitrary code running on Switch 2 hardware, using nothing but a cartridge Nintendo already approved and sold.

That distinction matters for how seriously to take it. A userland foothold on its own doesn’t threaten anyone’s save data or let a stranger take over your console remotely. What it threatens is Nintendo’s ability to close the door later. Every prior jailbreak vector on the Switch 2 has depended on software Nintendo could remove from its storefront. CivSwitch depends on a physical object already sitting on store shelves and in warehouses around the world, which is exactly why 2K’s recall is the only lever anyone has left to pull.

The bug: a web browser hiding inside a strategy game

Modern multiplatform games rarely build their menus, lobby screens, and chat windows as native C++ interfaces anymore. It’s faster and cheaper to embed a lightweight HTML, CSS, and JavaScript rendering engine (think Coherent Gameface, Ultralight, or an in-house WebKit fork) directly inside the game’s main process and let a small set of bindings pass data between the web layer and the engine underneath it.

Civilization VII does this for its local wireless multiplayer lobby, which includes a text chat box. In the version 1.0.0 build that shipped on physical Switch 1 cartridges, that chat box takes whatever a player types and appends it to the chat panel’s document object model without properly sanitizing it first. Type ordinary text and nothing happens. Type an <img> tag with a broken source attribute and an onerror handler, and the embedded renderer treats it as markup to execute rather than text to display.

On a desktop browser, a bug like that is boxed in by sandboxing and the same-origin policy. Inside a console’s embedded UI layer, the JavaScript context frequently shares memory with the game process itself, or has a direct interface into native engine functions. Gezine’s exploit code, which draws on earlier work from the Netflix-N-Hack scene project, uses that shared access to allocate memory, read and write the game’s mounted save partition, and open raw network sockets, all from inside what was supposed to be a harmless chat window.

The bug only exists in the unpatched 1.0.0 build. Firaxis and 2K fixed the sanitization flaw in later patches, so anything downloaded from the eShop, along with the Switch 2 native edition (sold only as a digital code-in-box voucher), pulls the corrected version automatically. The only way to trigger it is to insert an unpatched physical Switch 1 cartridge into a Switch 2 and decline the prompt to update the game. Gezine confirmed the toolchain works across original Switch firmware 22.5.0 and Switch 2 firmware from 20.0.0 up through 23.0.1.

Getting a real exploit through a tiny chat box

Finding the bug is one problem. Smuggling a functional exploit payload through a multiplayer chat field is a separate, harder one. In-game chat inputs typically cap message length, strip newlines, and run everything through a profanity filter that scrubs or mangles flagged substrings. A compressed payload that happens to generate a four-letter sequence matching the filter’s word list will come out corrupted on the other end, and a single corrupted byte breaks the whole thing.

CivSwitch gets around this with a build pipeline that minifies and compresses the actual exploit code using standard JavaScript tooling, then re-encodes the compressed bitstream into a restricted character set chosen specifically to avoid colliding with common profanity filters. The encoded payload is split into roughly 87 short lines, each wrapped in its own broken-image tag that appends one chunk to an accumulator string running in the background. The final line triggers decompression and execution of the reassembled code.

📬 Stay Ahead of Cyber Threats

Get the latest cybersecurity news, critical vulnerabilities, threat intelligence, tutorials, and exclusive giveaways delivered straight to your inbox. No spam. Unsubscribe anytime.

Subscribe to the Newsletter →

Typing out that many lines by hand through a Switch’s on-screen keyboard isn’t realistic, so the project pairs the software bug with a small USB microcontroller, built on the Raspberry Pi Pico’s open hardware platform, configured to enumerate as a standard USB keyboard and type the payload automatically. Because the console translates numeric USB keycodes through whatever keyboard layout is active, the process only works reliably with the system language set to US English, and typing the full payload this way takes somewhere in the neighborhood of fifteen to twenty minutes.

Once the exploit code lands, it opens a local network connection between the console and a PC on the same network, which a companion script can use to push unrestricted follow-up JavaScript into the running game with none of the chat box’s size or character limits.

Making it stick without plugging in a Pico every time

Re-running a fifteen-minute USB injection on every boot would make iterative work painful, so CivSwitch includes a second piece that converts the initial foothold into something persistent. While the network listener is active, a companion tool on the researcher’s PC uploads a crafted save file to the running game and instructs it to write that file into Civilization VII’s save data.

The trick works because the save-file browser has the same sanitization gap as the chat box. When a player opens the load-game menu, Civilization VII reads metadata strings, like a save’s title or configuration label, straight out of the save file and feeds them into the same unsanitized HTML/JS menu. A save file engineered to carry executable markup in its metadata fires the moment the load-game screen renders it, no chat box required.

Once that trigger file is in place, a player can revert their system language back to normal, and from then on, simply opening Civilization VII’s load-game menu brings the exploit’s network listener back online within seconds. It survives sleep and wake cycles, too, staying responsive for as long as the game process sits suspended in memory.

CivSwitch, ns2jb, and a real kernel compromise aren’t the same thing

What’s comparedCivSwitch (Gezine)ns2jb (pepsipu)Full custom firmware (e.g. the original Switch’s fusée gelée)
Entry pointCivilization VII v1.0.0, Switch 1 physical cartridge, lobby chat bugSmileBASIC 4, a Switch 1 digital eShop app, integer overflow bugTegra X1 USB recovery mode hardware flaw
How it’s deliveredOffline USB keyboard emulator, then a local network connectionAutomated capture-and-input rigUSB payload injection, no software bug required
Privilege levelSandboxed application userlandSystem service userland, with spoofed elevated permissionsFull kernel and secure-monitor control
PersistenceA crafted save file that re-triggers on every load-game screenTethered; has to be re-run from the entry app on every cold bootTethered or modchip-based, triggered before the OS loads
What it unlocksSave editing, mods, userland homebrew, limited OS probingNative code running as a system service, file swapping, module extractionArbitrary unsigned software, including pirated games

CivSwitch sits firmly in the first column: userland access, not a jailbreak in the full sense the word usually implies. But it’s worth understanding why a userland foothold matters so much, by looking at what Hajhamid built on top of a similar one with ns2jb. Using an automated rig built from video-capture hardware, a Bluetooth-driven button presser to reset the console after crashes, and parallel instances of an AI coding agent, Hajhamid first tried to find a path in through the Switch 2’s browser engine. When hardware-level defenses against code-reuse attacks stalled that approach, he pivoted to the SmileBASIC 4 integer overflow instead, which gave him an initial read-write primitive.

From there, he found a separate buffer overflow in the Switch 2’s filesystem service triggered by an overly long file path, escalated that into broader memory access, and used it to make his process impersonate the system’s most privileged process. With that level of access, he exploited a structural gap in how the console verifies signed executables: the loader trusts the filesystem service to hand it the files it checks, so with the filesystem service already compromised, he could swap in his own files after the verification step had already passed. That chain let him run modified game code and dump internal system modules for further research, all starting from a single userland bug very similar in spirit to the one CivSwitch uses.

When Nintendo pulled SmileBASIC 4 to starve ns2jb of its entry point, the modding community lost that foothold. CivSwitch, released six days later, gave it back, except this time on physical media that can’t be delisted.

Why 2K pulled Civilization VII off shelves

Within four days of the CivSwitch repository going public, secondary-market prices for physical Switch 1 copies of Civilization VII spiked as researchers and hobbyists bought up remaining stock. By November 5, buyers across Europe and North America started reporting that their orders were being canceled before they shipped. A customer service notice shared to the Switch modding community on Reddit (and attributed to an Amazon marketplace fulfillment partner) said Amazon and other retail partners had been told directly by 2K Games to halt sales and recall physical cartridges over “technical and security-related requirements.” Buyers caught in the recall were offered a refund or a substitute: the digital code-in-box edition, which forces a download of the patched build and renders CivSwitch inert.

Neither 2K nor Nintendo has made an official statement explaining the recall, so the reasoning here is inference, not confirmed fact, though it’s a fairly short inferential leap. Third-party publishers operate under Nintendo’s platform licensing terms, which typically obligate them to remediate defects that compromise the console’s security. When a vulnerability lives in a digital release, Nintendo can act unilaterally by delisting it. When it lives on a pressed cartridge already sitting in distributor warehouses, delisting does nothing, and a physical recall is the only mechanism left that actually reduces the number of unpatched copies in circulation.

What this means for the next console transition

The CivSwitch story says something larger about where console security research is headed. Finding an entry point, building a working compression and delivery pipeline, adapting microcontroller hardware, and chaining separate userland bugs into something resembling system-level access used to take small teams of specialists months of manual work. In 2026, researchers are pairing commodity capture hardware with AI coding assistants to audit decompiled binaries and iterate through memory-corruption bugs in days rather than months, and the broader modding community is using the same tools to recompile and port homebrew software once a system is dumped.

Backward compatibility is one of the strongest selling points a console maker has at a hardware transition: bring your existing library forward, no repurchases required. CivSwitch is a reminder that every cartridge a new console accepts also carries the security posture of the day its code was finalized, which in Civilization VII’s case was over a year before the Switch 2 even launched. A manufacturer can harden a kernel, sign every executable, and strip vulnerable titles from a digital storefront overnight, but none of that reaches a shrink-wrapped disc or cartridge already sitting on a shelf.

Quick answers

Is CivSwitch a full Nintendo Switch 2 jailbreak? No. It provides userland code execution inside Civilization VII’s sandboxed process. It doesn’t break the Horizon OS kernel, bypass code signing for arbitrary software, or enable piracy of Switch 2 games on its own.

Can Nintendo patch CivSwitch the way it patched ns2jb’s entry point? Not directly. Nintendo delisted the app that powered ns2jb from its eShop. CivSwitch’s entry point is a pressed, unpatched physical cartridge already in circulation, which can’t be remotely altered or removed.

Why did 2K Games recall Civilization VII’s physical Switch cartridge? 2K reportedly instructed retailers including Amazon to halt sales and recall unpatched physical copies over “technical and security-related requirements,” offering a patched digital code-in-box edition instead. Neither 2K nor Nintendo has issued an official public explanation.

Buy me A Coffee!

Support The CyberSec Guru’s Mission

🔐 Fuel the cybersecurity crusade by buying me a coffee! Your contribution powers free tutorials, hands-on labs, and security resources.

Why your support matters:
  • Writeup Access: Get complete writeup access within 12 hours
  • Zero paywalls: Keep the main content 100% free for learners worldwide

Perks for one-time supporters:
☕️ $5: Shoutout in Buy Me a Coffee
🛡️ $8: Fast-track Access to Live Webinars
💻 $10: Vote on future tutorial topics + exclusive AMA access

“Your coffee keeps the servers running and the knowledge flowing in our fight against cybercrime.”☕ Support My Work

Buy Me a Coffee Button

If you like this post, then please share it:

Exploits

Discover more from The CyberSec Guru

Subscribe to get the latest posts sent to your email!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.