A file write primitive is a vulnerability that lets an attacker create or overwrite files on a target system. The written content may be arbitrary, partially controlled, or limited to certain paths, but even that can be dangerous if the attacker can influence scripts, configuration files, logs, cron jobs, or web-accessible content.
It matters because file placement is often the first step toward deeper compromise. A write primitive can be chained into code execution when the attacker drops a web shell, modifies startup files, injects code into an autoloaded file, or plants data where a privileged service will later execute it. Defenders look for unexpected file creation, odd permissions, and writes into executable or trusted directories. Limiting path access, sanitizing filenames, separating privileges, and monitoring file integrity all help prevent a harmless-looking write bug from becoming a full system takeover.


