Technical Analysis
Технический анализ
The Vulnerability
Уязвимость
Litematica's Servux protocol uses a custom plugin channel (servux:litematics) to transfer litematic schematics from server to client. The protocol transmits NBT-compound messages over Netty with a FileName field that specifies where on the client's filesystem the received data should be written.
Протокол Servux в Litematica использует кастомный плагин-канал (servux:litematics) для передачи схематиков litematic с сервера клиенту. Протокол передает NBT-compound сообщения через Netty с полем FileName, которое указывает, куда в файловой системе клиента должны быть записаны полученные данные.
The flaw: the FileName value is never sanitized. By supplying ../../mods/payload.jar, an attacker can traverse out of the intended .minecraft/litematics/ directory and write a file anywhere the Minecraft client process can write - most critically into the mods/ folder.
Проблема: значение FileName никогда не проверяется. Указав ../../mods/payload.jar, атакующий может выйти за пределы директории .minecraft/litematics/ и записать файл куда угодно - критичнее всего в папку mods/.
Protocol Walkthrough
Разбор протокола
The exploit uses three NBT messages sent over the servux:litematics channel. The server wraps each message in a compound with type=11 (the NBT response type the client expects for litematic transfers):
Эксплойт использует три NBT-сообщения, отправляемых через канал servux:litematics. Сервер оборачивает каждое сообщение в compound с type=11 (тип NBT-ответа, который клиент ожидает для передачи litematic):
{
"Task": "Litematic-TransmitStart",
"SliceKey": <random_long>,
"FileName": "../../mods/poc.litematic.jar",
"FileType": "litematic",
"TotalSlices": 1,
"TotalSize": <payload_size>
}
{
"Task": "Litematic-TransmitData",
"SliceKey": <same_key>,
"Slice": 0,
"Size": <payload_size>,
"Data": <raw_jar_bytes>
}
{
"Task": "Litematic-TransmitEnd",
"SliceKey": <same_key>,
"TotalSize": <payload_size>,
"TotalSlices": 1
}
Wire Format
Формат передачи
Each message is wrapped in a type-length-value structure before being sent over the Fabric networking API:
Каждое сообщение обернуто в структуру type-length-value перед отправкой через Fabric networking API:
[VarInt total_length]
[VarInt NBT_RESPONSE_DATA_TYPE (11)]
[VarInt nbt_length]
[NBT Compound]
The receiving Litematica client reads the type discriminator (11), dispatches to its NBT handler, which parses the compound and - upon seeing TransmitStart - creates a file output stream at the path constructed from FileName without any path traversal checks.
Клиент Litematica читает дискриминатор типа (11), передает NBT-обработчику, который парсит compound и - увидев TransmitStart - создает файловый поток вывода по пути из FileName без каких-либо проверок path traversal.
Attack Flow
Схема атаки
- Join server - the exploit mod (running on the server) hooks
ServerPlayConnectionEvents.JOINand waits 3 seconds (60 ticks). - Подключение - эксплойт-мод (на сервере) перехватывает
ServerPlayConnectionEvents.JOINи ждет 3 секунды (60 тиков). - Send Start - a
TransmitStartpacket is sent withFileName = "../../mods/malicious.jar". - Отправка Start - пакет
TransmitStartотправляется сFileName = "../../mods/malicious.jar". - Send Data - after a 2-tick delay, the raw bytes of a malicious Fabric mod are transmitted as the
Datafield. - Отправка Data - через 2 тика передаются сырые байты вредоносного Fabric-мода в поле
Data. - Send End - after another 2 ticks, a
TransmitEndfinalizes the transfer. The client closes the file handle. - Отправка End - еще через 2 тика
TransmitEndзавершает передачу. Клиент закрывает файловый дескриптор. - RCE - the malicious
.jarnow resides in the victim'smods/folder. On the next restart, arbitrary code executes in the Minecraft client process. - RCE - вредоносный
.jarтеперь в папкеmods/жертвы. При следующем перезапуске произвольный код выполняется в процессе Minecraft-клиента.
Impact
Последствия
Arbitrary File Write
Произвольная запись
Lets an attacker drop a malicious mod jar into the client's mods/ folder. On next game restart the code executes in the client process - full remote code execution, no additional steps needed.
Позволяет атакующему поместить вредоносный jar-мод в папку mods/ клиента. При следующем перезапуске код выполняется в процессе клиента - полное удаленное выполнение кода без дополнительных действий.
Stealth
Скрытность
The file transfer happens over the legitimate servux:litematics plugin channel. The victim sees nothing more than a brief Litematica popup saying the received file is in the wrong format - a few seconds of visual noise that most players will ignore or forget immediately.
Передача файла происходит через легитимный плагин-канал servux:litematics. Жертва видит лишь короткое всплывающее окно Litematica о неверном формате файла - несколько секунд визуального шума, который большинство игроков проигнорируют или сразу забудут.
Affected Versions
Затронутые версии
728116fb - the vulnerable FileName field is removed from transmit packets. The entire file-slicing transmission path (sliceForServux, sendTransmitFile) is deprecated and disabled. All users should update to 0.28.3-sakura.3 or later.
Зафиксировано в 728116fb - уязвимое поле FileName удалено из пакетов передачи. Весь механизм файловой нарезки (sliceForServux, sendTransmitFile) объявлен устаревшим и отключен. Всем пользователям следует обновиться до 0.28.3-sakura.3 или новее.
Timeline
Хронология
Vulnerability Reported & Fixed
Уязвимость обнаружена и исправлена
Members of Autism Inc and DupersUnited - 数字 and Nightwane - independently discover the Litematica RCE after investigating a member compromise. They report it to Sakura Ryoko, who commits a fix (728116fb) the same evening. No public announcement is made at this time.
Участники Autism Inc и DupersUnited - 数字 и Nightwane - независимо обнаружили RCE в Litematica после расследования компрометации участника. Они сообщили об этом Sakura Ryoko, который в тот же вечер зафиксировал исправление (728116fb). Публичных объявлений в это время не было.
Sakura Ryoko's commit removes the FileName field from transmit packets entirely; the file-slicing machinery behind the path traversal (sliceForServux, sendTransmitFile) is deprecated and disabled. The commit is pushed without any public announcement.
Коммит Sakura Ryoko полностью удаляет поле FileName из пакетов передачи; механизм файловой нарезки (sliceForServux, sendTransmitFile) объявлен устаревшим и отключен. Коммит запушен без публичного объявления.
Autism Inc Publishes Warning
Autism Inc публикует предупреждение
Autism Inc posts a public warning detailing the RCE, how a "bad actor" in the duping community had been exploiting it to deploy RATs, and that the vulnerability was independently found by 数字 and Nightwane after investigating an incident where a member was compromised. The post links the exploit to the same individual behind a prior Meteor RCE campaign.
Autism Inc публикует публичное предупреждение с описанием RCE, как «bad actor» из дюп-сообщества эксплуатировал ее для установки RAT, и что уязвимость была независимо найдена 数字 и Nightwane после расследования инцидента с компрометацией участника. В посте эксплойт связывается с тем же лицом, стоящим за предыдущей Meteor RCE-кампанией.
Silent Commit Discovered
Тихий коммит обнаружен
I, upon hearing rumors of the exploit, began investigating. I noticed the silent fix commit in Litematica's repository. After reverse engineering the fix and tracing it back to the vulnerable code path, I independently developed a working proof-of-concept exploit - a Fabric server-side mod that sends crafted NBT payloads to write arbitrary files via the path traversal.
Я, услышав слухи об эксплойте, начал расследование. Я заметил тихий фикс-коммит в репозитории Litematica. После реверса патча и отслеживания уязвимого кода я независимо разработал рабочий proof-of-concept эксплойт - Fabric-мод на стороне сервера, отправляющий сформированные NBT-нагрузки для записи произвольных файлов через path traversal.
Developer Announces Fix
Разработчик объявляет об исправлении
Sakura Ryoko (Litematica developer) posts a public @everyone announcement in the official MasaModding Discord server. Confirms that the vulnerability was brought to their attention by unfair.advantage (@528586172558082059) and shinxiolio (@1416317364865335357) from Autism Inc and DupersUnited. Details the affected version range (MC 1.21+, introduced in 1.21.5-0.22.2-sakura.4 on 19 May 2025, backported to several branches on 31 Dec 2025) and lists all fixed releases.
Sakura Ryoko (разработчик Litematica) публикует объявление @everyone на официальном MasaModding Discord-сервере. Подтверждает, что уязвимость была доведена до их сведения unfair.advantage (@528586172558082059) и shinxiolio (@1416317364865335357) из Autism Inc и DupersUnited. Описывает диапазон затронутых версий (MC 1.21+, введено в 1.21.5-0.22.2-sakura.4 19 мая 2025, бэкпортировано в несколько веток 31 дек 2025) и перечисляет все исправленные релизы.
This Writeup
Мой анализ
This writeup is not by the original discoverers. I (AliensToEarth) was not involved in the early finding or reporting the vulnerability. I became aware of the RCE through community chatter and decided to investigate the source code myself. While doing so, I noticed the developer had pushed a fix commit without any public announcement. I reverse engineered the vulnerability from the diff, developed this PoC independently, and am publishing this technical breakdown for the transparency.
Этот материал не от первоначальных исследователей бага. Я (AliensToEarth) не участвовал в первичном поиске или сообщении об уязвимости. Я узнал об RCE через слухи в сообществе и решил самостоятельно исследовать исходный код. В процессе я заметил, что разработчик запушил фикс-коммит без публичного объявления. Я произвел реверс уязвимости из diff, независимо разработал этот PoC и публикую технический разбор для прозрачности.
The original vulnerability was found and responsibly disclosed by 数字 and Nightwane from Autism Inc / DupersUnited, who coordinated with the developer to get it patched. The public @everyone announcement was made by Sakura Ryoko on 2026-07-06 at 23:30 UTC+4.
Оригинальная уязвимость была найдена и ответственно раскрыта 数字 и Nightwane из Autism Inc / DupersUnited, которые скоординировались с разработчиком для ее исправления. Публичное объявление @everyone было сделано Sakura Ryoko 2026-07-06 в 23:30 UTC+4.
The proof-of-concept code for this writeup is available in the PoC repository.
Proof-of-concept код доступен в PoC-репозитории.