Skip to content

Lesson 3 of 13 · 16m

No Sandbox: What a Plugin Can Do to Your Machine

Plugins are unsigned code inside your server's JVM — the fractureiser incident and the trust rules for jars and dependencies.

The permission system you are thinking of — permissions: in plugin.yml, permission nodes, op status, LuckPerms groups — governs what players can do through a plugin. It governs nothing about what the plugin does to your machine. Those are two different security boundaries, and the second one does not exist.

The actual security model

A plugin is a jar loaded into the server's JVM by PluginClassLoader. From onEnable onward it can do anything Java can do: open sockets, read ~/.aws/credentials, enumerate the filesystem, spawn processes with Runtime.exec, reflect into the server's private fields, rewrite world data. There is no sandbox. There is no permission manifest for host resources. PluginManager decides whether a plugin loads; it places no constraint on what a loaded plugin does next.

The consequence is worth stating plainly: installing a plugin is granting code execution as the server user. Every jar in plugins/ is trusted completely by the JVM that keeps your players alive.

June 2023

In early June 2023 a malware campaign called fractureiser shipped inside plugin and mod jars distributed through BukkitDev and CurseForge. An infected jar carried a "stage 0" payload — a small class that phoned out to 85.217.144.130, fetched the next stages, and then did the part people remember: it scanned the host for other .jar files — every plugin, every mod, the server jar itself — and injected itself into each. One bad download turned the whole plugins/ directory into carriers. Cleanup was not "delete the bad plugin." It was re-download every jar from source and audit the host for persistence.

The detection work was volunteer-driven — the community shipped scanners like nekodetector within days, and Prism Launcher and CurseForge published their own forensics. No platform-side scanner caught it first. That is the point: in this ecosystem, the security model is you.

What plugin authors owe

You sit on both sides of this.

As an author:

  • Keep dependencies boring. Every shaded library is supply chain. Pin versions, resolve them from Maven Central or the vendor's repo, and prefer libraries: in plugin.yml so Paper resolves them itself.
  • Never ship code you cannot explain. If your plugin does something that resembles exfiltration — outbound HTTP carrying player data — document it, or an auditor will name it for you.
  • If your plugin downloads and loads code at runtime — scripting plugins, self-updaters — you have built a malware stage 0 with a friendly name. Pin downloads by checksum and state where they come from.
  • Obfuscation is a red flag, not a feature. A paid plugin that hides its bytecode is asking you to run un-auditable code as the server user — price that into the purchase decision.
  • Auto-updaters that download a jar and swap it into plugins/ are a self-owned supply chain. If you ship one, pin the download URL to TLS, verify a published SHA-256, and never let the updater fetch from an unauthenticated mirror.

As the server owner installing plugins — which is also you, on your test server:

  • Download from Hangar, Modrinth, or the author's official page. "Free premium plugin" re-upload sites are the oldest trap in the ecosystem; leaked premium jars are the classic malware carrier.
  • Verify checksums where the author publishes them. For a jar you don't fully trust, unzip -l and javap -c on the suspicious classes takes five minutes — look for Runtime.exec, URL.openConnection to odd hosts, and ClassLoader tricks.
  • Run the server as a dedicated unprivileged user. Java gives the plugin whatever the OS gives that user, so the blast radius of a bad jar is exactly the service account's filesystem. A container or a jailed user with no ~/.ssh, no AWS creds, and no write access outside plugins/ turns a bad jar from an incident into a log line.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.