Creative clients can crash server through nbt component resolvers with book items
Modified clients with creative mode can give themselves books using nbt component resolving to make servers run out of heap space.
To quickly test this yourself without a modified client,
- place a command block and insert the following text (replacing "kennytv" with your player name or some other entity to have its nbt resolved): https://paste.gg/p/KennyTV/f853606d364947c28c852ccf78d73895
- get the book through the command block
- open the book
Somehow those nbt components start growing exponentially, see attached crash reports for the stacktrace.
... since the entity nbt is added and also includes that book in both the Inventory and SelectedItem tags, those are serialized multiple times as well