GSD-2021-39197

Vulnerability from gsd - Updated: 2021-09-07 00:00
Details
### Impact 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)._ ### Patches 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". ### Workarounds There are no known workarounds to mitigate the risk of using older releases of better_errors. ### References - Chris Moberly provided [an example attack that uses a now-patched vulnerability of webpack-dev-server in conjunction with Better Errors](https://about.gitlab.com/blog/2021/09/07/why-are-developers-vulnerable-to-driveby-attacks/) ### For more information If you have any questions or comments about this advisory, please - Add to the [discussion in better_errors](https://github.com/BetterErrors/better_errors/discussions/507) - Open an issue in [better_errors](https://github.com/BetterErrors/better_errors)
Aliases

{
  "GSD": {
    "alias": "CVE-2021-39197",
    "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 \"~\u003e 2.8.3\". There are no known workarounds to mitigate the risk of using older releases of better_errors.",
    "id": "GSD-2021-39197"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "affected": [
        {
          "package": {
            "ecosystem": "RubyGems",
            "name": "better_errors",
            "purl": "pkg:gem/better_errors"
          }
        }
      ],
      "aliases": [
        "CVE-2021-39197",
        "GHSA-w3j4-76qw-wwjm"
      ],
      "details": "### Impact\nbetter_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.\n\n_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)._\n\n### Patches\nStarting with release 2.8.x, CSRF protection is enforced. It is recommended that you upgrade to the latest release, or minimally to \"~\u003e 2.8.3\".\n\n### Workarounds\nThere are no known workarounds to mitigate the risk of using older releases of better_errors.\n\n### References\n- Chris Moberly provided [an example attack that uses a now-patched vulnerability of webpack-dev-server in conjunction with Better Errors](https://about.gitlab.com/blog/2021/09/07/why-are-developers-vulnerable-to-driveby-attacks/)\n\n### For more information\nIf you have any questions or comments about this advisory, please\n- Add to the [discussion in better_errors](https://github.com/BetterErrors/better_errors/discussions/507)\n- Open an issue in [better_errors](https://github.com/BetterErrors/better_errors)\n",
      "id": "GSD-2021-39197",
      "modified": "2021-09-07T00:00:00.000Z",
      "published": "2021-09-07T00:00:00.000Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm"
        }
      ],
      "schema_version": "1.4.0",
      "severity": [
        {
          "score": 6.3,
          "type": "CVSS_V3"
        }
      ],
      "summary": "Older releases of better_errors open to Cross-Site Request Forgery attack"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security-advisories@github.com",
        "ID": "CVE-2021-39197",
        "STATE": "PUBLIC",
        "TITLE": "Cross-Site Request Forgery in better_errors"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "better_errors",
                    "version": {
                      "version_data": [
                        {
                          "version_value": "\u003c 2.8.0"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "BetterErrors"
            }
          ]
        }
      },
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "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 \"~\u003e 2.8.3\". There are no known workarounds to mitigate the risk of using older releases of better_errors."
          }
        ]
      },
      "impact": {
        "cvss": {
          "attackComplexity": "HIGH",
          "attackVector": "NETWORK",
          "availabilityImpact": "NONE",
          "baseScore": 6.3,
          "baseSeverity": "MEDIUM",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "privilegesRequired": "LOW",
          "scope": "CHANGED",
          "userInteraction": "NONE",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N",
          "version": "3.1"
        }
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "lang": "eng",
                "value": "CWE-352: Cross-Site Request Forgery (CSRF)"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm",
            "refsource": "CONFIRM",
            "url": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm"
          },
          {
            "name": "https://github.com/BetterErrors/better_errors/pull/474",
            "refsource": "MISC",
            "url": "https://github.com/BetterErrors/better_errors/pull/474"
          },
          {
            "name": "https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0",
            "refsource": "MISC",
            "url": "https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0"
          },
          {
            "name": "https://github.com/BetterErrors/better_errors/discussions/507",
            "refsource": "MISC",
            "url": "https://github.com/BetterErrors/better_errors/discussions/507"
          }
        ]
      },
      "source": {
        "advisory": "GHSA-w3j4-76qw-wwjm",
        "discovery": "UNKNOWN"
      }
    },
    "github.com/rubysec/ruby-advisory-db": {
      "cve": "2021-39197",
      "cvss_v3": 6.3,
      "date": "2021-09-07",
      "description": "### Impact\nbetter_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.\n\n_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)._\n\n### Patches\nStarting with release 2.8.x, CSRF protection is enforced. It is recommended that you upgrade to the latest release, or minimally to \"~\u003e 2.8.3\".\n\n### Workarounds\nThere are no known workarounds to mitigate the risk of using older releases of better_errors.\n\n### References\n- Chris Moberly provided [an example attack that uses a now-patched vulnerability of webpack-dev-server in conjunction with Better Errors](https://about.gitlab.com/blog/2021/09/07/why-are-developers-vulnerable-to-driveby-attacks/)\n\n### For more information\nIf you have any questions or comments about this advisory, please\n- Add to the [discussion in better_errors](https://github.com/BetterErrors/better_errors/discussions/507)\n- Open an issue in [better_errors](https://github.com/BetterErrors/better_errors)\n",
      "gem": "better_errors",
      "ghsa": "w3j4-76qw-wwjm",
      "patched_versions": [
        "\u003e= 2.8.0"
      ],
      "title": "Older releases of better_errors open to Cross-Site Request Forgery attack",
      "url": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm"
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003c2.8.0",
          "affected_versions": "All versions before 2.8.0",
          "cvss_v2": "AV:N/AC:M/Au:N/C:P/I:P/A:P",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "cwe_ids": [
            "CWE-1035",
            "CWE-937"
          ],
          "date": "2021-09-14",
          "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 did not implement CSRF protection for its internal requests.",
          "fixed_versions": [
            "2.8.0"
          ],
          "identifier": "CVE-2021-39197",
          "identifiers": [
            "CVE-2021-39197",
            "GHSA-w3j4-76qw-wwjm"
          ],
          "not_impacted": "All versions starting from 2.8.0",
          "package_slug": "gem/better_errors",
          "pubdate": "2021-09-07",
          "solution": "Upgrade to version 2.8.0 or above.",
          "title": "Cross-Site Request Forgery (CSRF)",
          "urls": [
            "https://nvd.nist.gov/vuln/detail/CVE-2021-39197"
          ],
          "uuid": "06a0eac3-52c2-4c55-b1e2-d0b2ddd71fe4"
        }
      ]
    },
    "nvd.nist.gov": {
      "configurations": {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:better_errors_project:better_errors:*:*:*:*:*:ruby:*:*",
                "cpe_name": [],
                "versionEndExcluding": "2.8.0",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      },
      "cve": {
        "CVE_data_meta": {
          "ASSIGNER": "security-advisories@github.com",
          "ID": "CVE-2021-39197"
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "en",
              "value": "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 \"~\u003e 2.8.3\". There are no known workarounds to mitigate the risk of using older releases of better_errors."
            }
          ]
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "en",
                  "value": "CWE-352"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/BetterErrors/better_errors/commit/8e8e796bfbde4aa088741823c8a3fc6df2089bb0"
            },
            {
              "name": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm",
              "refsource": "CONFIRM",
              "tags": [
                "Third Party Advisory"
              ],
              "url": "https://github.com/BetterErrors/better_errors/security/advisories/GHSA-w3j4-76qw-wwjm"
            },
            {
              "name": "https://github.com/BetterErrors/better_errors/pull/474",
              "refsource": "MISC",
              "tags": [
                "Patch",
                "Third Party Advisory"
              ],
              "url": "https://github.com/BetterErrors/better_errors/pull/474"
            },
            {
              "name": "https://github.com/BetterErrors/better_errors/discussions/507",
              "refsource": "MISC",
              "tags": [
                "Third Party Advisory"
              ],
              "url": "https://github.com/BetterErrors/better_errors/discussions/507"
            }
          ]
        }
      },
      "impact": {
        "baseMetricV2": {
          "acInsufInfo": false,
          "cvssV2": {
            "accessComplexity": "MEDIUM",
            "accessVector": "NETWORK",
            "authentication": "NONE",
            "availabilityImpact": "PARTIAL",
            "baseScore": 6.8,
            "confidentialityImpact": "PARTIAL",
            "integrityImpact": "PARTIAL",
            "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P",
            "version": "2.0"
          },
          "exploitabilityScore": 8.6,
          "impactScore": 6.4,
          "obtainAllPrivilege": false,
          "obtainOtherPrivilege": false,
          "obtainUserPrivilege": false,
          "severity": "MEDIUM",
          "userInteractionRequired": true
        },
        "baseMetricV3": {
          "cvssV3": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.8,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "exploitabilityScore": 2.8,
          "impactScore": 5.9
        }
      },
      "lastModifiedDate": "2021-09-14T18:34Z",
      "publishedDate": "2021-09-07T18:15Z"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…