CVE-2020-16252:
Field Test CSRF vulnerability
4.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.32978%
CWE
Published
8/5/2020
Updated
7/5/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
field_test | rubygems | >= 0.2.0, <= 0.3.2 | 0.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from Rails' protect_from_forgery
defaulting to :null_session
, which only clears the session when CSRF validation fails. Since non-session authentication methods (like HTTP Basic Auth) don't rely on session cookies, this strategy fails to protect them. The fix explicitly sets with: :exception
to enforce CSRF token validation regardless of authentication method. The affected code is directly shown in the commit diff modifying BaseController
.