Writing unsanitized user data into logs can allow malicious contents into it. Use appropriate sanitizers or validators on the user data before writing the data into logs.