8.8
HIGH
CVE-2021-39197
"Remote Code Execution via CSRF in better_errors"
Description

better_errors is an open source replacement for the standard Rails error page with more information rich error pages. It is also usable outside of Rails in any Rack app as Rack middleware. better_errors prior to 2.8.0 did not implement CSRF protection for its internal requests. It also did not enforce the correct "Content-Type" header for these requests, which allowed a cross-origin "simple request" to be made without CORS protection. These together left an application with better_errors enabled open to cross-origin attacks. As a developer tool, better_errors documentation strongly recommends addition only to the `development` bundle group, so this vulnerability should only affect development environments. Please ensure that your project limits better_errors to the `development` group (or the non-Rails equivalent). Starting with release 2.8.x, CSRF protection is enforced. It is recommended that you upgrade to the latest release, or minimally to "~> 2.8.3". There are no known workarounds to mitigate the risk of using older releases of better_errors.

INFO

Published Date :

Sept. 7, 2021, 6:15 p.m.

Last Modified :

Nov. 21, 2024, 6:18 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2021-39197 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Better_errors_project better_errors

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-39197 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-39197 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0
    Added Reference https://github.com/BetterErrors/better_errors/discussions/507
    Added Reference https://github.com/BetterErrors/better_errors/pull/474
    Added Reference https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Sep. 14, 2021

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0 No Types Assigned https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0 Patch, Third Party Advisory
    Changed Reference Type https://github.com/BetterErrors/better_errors/discussions/507 No Types Assigned https://github.com/BetterErrors/better_errors/discussions/507 Third Party Advisory
    Changed Reference Type https://github.com/BetterErrors/better_errors/pull/474 No Types Assigned https://github.com/BetterErrors/better_errors/pull/474 Patch, Third Party Advisory
    Changed Reference Type https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm No Types Assigned https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:better_errors_project:better_errors:*:*:*:*:*:ruby:*:* versions up to (excluding) 2.8.0
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-39197 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-39197 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.21 }} 0.05%

score

0.40859

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability
© cvefeed.io
Latest DB Update: Jun. 29, 2025 21:10