A server-side file write is a flaw where attacker-influenced input can make a server create, overwrite, or modify a file in an unintended location. The input may look harmless, such as a filename, path fragment, uploaded content, or template value, but if it reaches file-handling code without strict validation and path controls, it can alter data on disk.
This matters because writing files is often a step toward deeper compromise. In real attacks, it can corrupt application settings, plant executable code, replace trusted content, or prepare a later privilege-escalation chain. Defenders reduce the risk by normalizing paths, blocking traversal sequences, enforcing allowlists, using fixed storage directories, and running services with minimal write permissions. Logging and alerting on unexpected file activity also help detect abuse early.


