Minecraft vulnerability leaves servers exposed to forced crashes

Minecraft

Developer Ammar Askar has revealed a serious vulnerability in Minecraft that will allow just about anyone to crash a hosting server. The security flaw results from the ability of the client to send information to the server about inventory slots; when used in conjunction with the NBT metadata storage format, users can send packets that are "incredibly complex for the server to deserialize but trivial for us to generate."

The explanation on Askar's blog (via Ars Technica) is fairly technical, but what it boils down to is that Minecraft users can, with relative ease, create objects that simply overwhelm remote servers. As an example, Askar created one called "rekt," a five-level series of lists within lists.

"The root of the object, rekt, contains 300 lists. Each list has a list with 10 sublists, and each of those sublists has 10 of their own, up until 5 levels of recursion. That’s a total of 10^5 * 300 = 30,000,000 lists," he explained. "And this isn’t even the theoretical maximum for this attack. Just the NBT data for this payload is 26.6 megabytes. But luckily Minecraft implements a way to compress large packets, lucky us! zlib shrinks down our evil data to a mere 39 kilobytes."

The killing stroke comes when the server decompresses that data and then tries to digest it. "When it attempts to parse it into NBT, it’ll create java representations of the objects meaning suddenly, the server is having to create several million java objects including ArrayLists," Askar wrote. "This runs the server out of memory and causes tremendous cpu load."

Askar said he was hesitant to reveal the flaw, but decided to go ahead because Mojang hasn't done anything to fix it despite being warned about it almost two full years ago. "Mojang is no longer a small indie company making a little indie game, their software is used by thousands of servers, hundreds of thousands [of] people play on servers running their software at any given time. They have a responsibility to fix and properly work out problems like this," he wrote. "In addition, it should be noted that giving condescending responses to white hats who are responsibly disclosing vulnerabilities and trying to improve a product they enjoy is a sure fire way to get developers dis-interested the next time they come across a bug like this."

In an update to his post, he noted that in the wake of his revelation, Mojang has identified the problem and attempted to fix it, but has thus far been unable to do so.

Update: Mojang has released a security update that takes Minecraft to version 1.8.4, which fixes the security vulnerability "in addition to some other minor bug fixes & performance tweaks." The update is fully compatible with all previous 1.8 releases, and Mojang strongly recommends that all players upgrade to the new version as soon as possible.

Andy Chalk
US News Lead

Andy has been gaming on PCs from the very beginning, starting as a youngster with text adventures and primitive action games on a cassette-based TRS80. From there he graduated to the glory days of Sierra Online adventures and Microprose sims, ran a local BBS, learned how to build PCs, and developed a longstanding love of RPGs, immersive sims, and shooters. He began writing videogame news in 2007 for The Escapist and somehow managed to avoid getting fired until 2014, when he joined the storied ranks of PC Gamer. He covers all aspects of the industry, from new game announcements and patch notes to legal disputes, Twitch beefs, esports, and Henry Cavill. Lots of Henry Cavill.

Latest in Survival & Crafting
Man facing camera
The Day Before studio reportedly sues Russian website for calling infamous disaster-game a 'scam'
Sunset in the desert in Hello Sunshine
Hello Sunshine is a desert survival sandbox where you live in the literal shadow of the colossus
Performers acting as zombies are seen on a train coach during the "Train to Apocalypse" event as part of the Pandora Box Artmire Festival 2024 held to attract commuters to ride the city's rapid transit system LRT (light rapid transit), in Jakarta on July 11, 2024. (Photo by BAY ISMOYO / AFP) (Photo by BAY ISMOYO/AFP via Getty Images)
Venerable browser-based MMO Urban Dead is closing this week after a 20-year run, not with a bang but with a whimper
Wearing a hazmat suit, a Rust player proudly holds up a freshly cooked pie, foregrounded by a table covered with pies and a large pumpkin on the left.
Rust's crafting update gives the survival sim real-time food cooking and pies to rival Monster Hunter, but the tastiest treat is the ability to make and throw 'bee grenades'
A pig, a cow, and two birds dance
Minecraft Live returns in March with everyone's favorite kind of content: 'exclusive movie content'
An explosion in a desert environment
Survival sandbox Core Keeper gets explosive next week with a whole new skill tree devoted to bombs and grenades
Latest in News
Man facing camera
The Day Before studio reportedly sues Russian website for calling infamous disaster-game a 'scam'
Will Poulter holding a CD ROM
'What are most games about? Killing': Black Mirror Season 7 includes a follow-up to 2018 interactive film Bandersnatch
Casper Van Dien in Starship Troopers
Sony, which is making a Helldivers 2 movie, is also making a new Starship Troopers movie, but it's not based on the Starship Troopers movie we already have
Assassin's Creed meets PUBG
Ubisoft is reportedly talking to Tencent about creating a new business entity to manage Assassin's Creed and other big games
Resident Evil Village - Lady Dimitrescu
'It really truly changed my life in every possible way': Lady Dimitrescu actor says her Resident Evil Village role was just as transformative for her as it was for roughly half the internet in 2021
Storm trooper hero
Another live service shooter is getting shut down, this time before it even launched on Steam