Understand security guards

Input validation and bounded work protect specific paths, with effects you should test.

On this page

Protection scope

Six guards are enabled independently by default. They run in the existing packet decoder or real main thread without changing thread identity. Rules evolve with findings; not every problem can be recognized or blocked.

They do not replace firewalls, DDoS protection, correct proxy configuration, permissions, backups, or software updates. Network congestion can happen before game validation is reached.

NBT and packet patterns

NBT validation checks relevant input sizes, depth, types, lengths, strings, and aggregate complexity before materialization. Defaults are 2 MiB, depth 512, and 2,097,152 nodes/elements. Native heap quotas remain separate. Not all internal plugin/disk data passes this network scanner.

The pattern guard defaults to an empty literal list with a 2 MiB payload cap. It scans applicable encoded packet/channel bytes, not every semantic interpretation. Low limits or broad rules can reject legitimate input.

Literal rules

security.crash-pattern-guard.patterns accepts at most 128 objects:

FieldMeaning and bounds
idUnique, 1..64 lowercase letters, digits, _, ., -
channelAt most 128 characters; exact namespaced ID, *, or a namespace pattern such as example:*
substringUTF-8 literal up to 512 bytes, not regex
max-bytesInteger 0..2097152; zero disables the size condition

The channel and every configured condition must match. A positive size condition matches only when size is greater than max-bytes. At least one nonempty literal or positive size condition is required. A 4 MiB aggregate scan-work budget can also trigger the action. Verify rules against your own legitimate plugin protocol; no attack payload is needed.

Flood and player-work budgets

The PLAY flood bucket defaults to 300 packets/second with burst 600 per connection. It counts frames, not bandwidth. SKIP drops excess frames; prolonged floods can still interfere with acknowledgements and native timeout behavior.

The main player guard defaults to 64 packets/player/tick and 2,000 µs. SKIP defers gameplay in bounded FIFO order; overflow rejects the newest packet. Running handlers cannot be preempted, so this is not a hard 2 ms cap. DISCONNECT is stricter and can disconnect when a legitimate slow plugin exhausts the budget.

Redstone and other input

Default redstone limits admit 4,096 updates/chunk/tick, with 8,192 deferred entries/chunk and 65,536/world. Dense legitimate circuits can run later. Full queues drop newest updates; deferred work is not saved at restart. Not every bulk wire or piston operation is separately time-sliced.

Raw placement block NBT is allowed by default. Disabling it can affect plugin items; modern components keep separate paths. Known-shape downloader requests on wdl:request have a default 2/second, burst 8 bucket. Channel names alone do not establish abuse, and other downloaders are not automatically detected.

See all settings and false positives.

Loading the index…