User input in format string detected.


If an application includes user input directly in a format string, an attacker can use format specifiers in the user input to produce misleading or fabricated messages.


❌ Avoid format strings containing user input:

sprintf("The value was #{params[:value]}")

✅ Use a literal format string with additional arguments:

sprintf("The value was %s", params[:value])

Associated CWE

Ready to take the next step? Join the Bearer Cloud waitlist.