Property
Languageruby
Severityhigh
CWECWE-650: Trusting HTTP Permission Methods on the Server Side
OWASPA04:2021 - Insecure Design
Confidence LevelMedium
Impact LevelMedium
Likelihood LevelHigh

Description#

The code checks only for GET requests using request.get?, but in Rails, HEAD requests are routed as GET and will not pass this check. This can lead to unexpected or incorrect behavior if HEAD requests aren’t properly handled.

Impact#

Attackers may exploit this oversight to bypass certain logic or access routes in unintended ways, potentially exposing sensitive information or causing the application to behave unpredictably under HEAD requests. This can result in data leakage or functionality misuse.