{"id":"CVE-2020-16252","aliases":["EUVD-2020-0646","GHSA-w542-cpp9-r3g7"],"status":"published","title":"Field Test CSRF vulnerability","description":"The Field Test gem 0.2.0 through 0.3.2 for Ruby allows CSRF.","severity":{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00426,"percentile":0.37167,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-352"],"published":"2020-08-05T13:40:16Z","modified":"2026-10-20T10:51:58Z","fixes":[{"ecosystem":"RubyGems","package":"field_test","fixed_in":["0.4.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"field_test","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.0"},{"last_affected":"0.3.2"},{"fixed":"0.4.0"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"field_test","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.0"},{"fixed":"0.4.0"}]}],"versions":["0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.3.0","0.3.1","0.3.2"]}],"products":[{"vendor":"field_test_project","product":"field_test"}],"references":[{"url":"https://github.com/ankane/field_test","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","package"]},{"url":"https://github.com/ankane/field_test/issues/28","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-16252","tags":["advisory"]},{"url":"https://github.com/ankane/field_test/commit/defd3fdf457c22d7dc5b3be7048481947bd5f0d0","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/field_test/CVE-2020-16252.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w542-cpp9-r3g7"}],"sources":{"cve":[{"id":"CVE-2020-16252","description":"The Field Test gem 0.2.0 through 0.3.2 for Ruby allows CSRF.","status":"published","published":"2020-08-05T13:40:16Z","modified":"2024-08-04T13:37:54.198Z","updated_at":"2026-11-02T14:35:59.116379Z"}],"euvd":[{"id":"EUVD-2020-0646","description":"The Field Test gem 0.2.0 through 0.3.2 for Ruby allows CSRF.","status":"published","published":"2020-08-05T13:40:16Z","modified":"2024-08-04T13:37:54Z","updated_at":"2026-11-03T03:07:28.673063Z"}],"ghsa":[{"id":"GHSA-w542-cpp9-r3g7","title":"Field Test CSRF vulnerability","description":"The Field Test dashboard is vulnerable to cross-site request forgery (CSRF) with non-session based authentication methods in versions v0.2.0 through v0.3.2.\n\n## Impact\nThe Field Test dashboard is vulnerable to CSRF with non-session based authentication methods, like basic authentication. Session-based authentication methods (like Devise's default authentication) are not affected.\n\nA CSRF attack works by getting an authorized user to visit a malicious website and then performing requests on behalf of the user. In this instance, a single endpoint is affected, which allows for changing the variant assigned to a user.\n\nAll users running an affected release should upgrade immediately.\n\n## Technical Details\nField Test uses the `protect_from_forgery` method from Rails to prevent CSRF. However, this defaults to `:null_session`, which has no effect on non-session based authentication methods. This has been changed to `protect_from_forgery with: :exception`.","status":"published","published":"2020-08-05T14:53:34Z","modified":"2023-07-05T20:19:50Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-352"],"updated_at":"2026-11-02T14:36:55.91458Z"}],"nvd":[{"id":"CVE-2020-16252","description":"The Field Test gem 0.2.0 through 0.3.2 for Ruby allows CSRF.","status":"published","published":"2020-08-05T14:15:12.67Z","modified":"2026-06-17T02:57:56.673Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-352"],"updated_at":"2026-11-02T14:06:10.994748Z"}],"osv":[{"id":"CVE-2020-16252","description":"The Field Test gem 0.2.0 through 0.3.2 for Ruby allows CSRF.","status":"published","published":"2020-08-05T14:15:12.67Z","modified":"2026-10-20T10:51:58.533297438Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:14.828228Z"},{"id":"GHSA-w542-cpp9-r3g7","title":"Field Test CSRF vulnerability","description":"The Field Test dashboard is vulnerable to cross-site request forgery (CSRF) with non-session based authentication methods in versions v0.2.0 through v0.3.2.\n\n## Impact\nThe Field Test dashboard is vulnerable to CSRF with non-session based authentication methods, like basic authentication. Session-based authentication methods (like Devise's default authentication) are not affected.\n\nA CSRF attack works by getting an authorized user to visit a malicious website and then performing requests on behalf of the user. In this instance, a single endpoint is affected, which allows for changing the variant assigned to a user.\n\nAll users running an affected release should upgrade immediately.\n\n## Technical Details\nField Test uses the `protect_from_forgery` method from Rails to prevent CSRF. However, this defaults to `:null_session`, which has no effect on non-session based authentication methods. This has been changed to `protect_from_forgery with: :exception`.","status":"published","published":"2020-08-05T14:53:34Z","modified":"2024-02-16T08:19:37.390564Z","cvss":[{"version":"3.1","score":4.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","level":"medium"}],"cwes":["CWE-352"],"updated_at":"2026-11-02T15:46:58.04805Z"}]}}
