User input detected in an unsafe deserialization method.


It is bad practice to deserialize untrusted data, such as data that comes from params or cookies, without sufficient verification. Attackers can transfer payloads or malicious code via serialized data, and deserializing such data puts your application at risk.


❌ Do not deserialize untrusted data

✅ Prefer pure (data-only) and language-agnostic (de)serialization formats such as JSON or XML

Avoiding language-specific (de)serialization formats reduces the risk of attackers manipulating the deserialization process for malicious purposes.

  user_data = JSON.parse(params[:user])
# handle any parsing errors



Associated CWE

OWASP Top 10