Read the docs
TI-2021-16582 Aliases CVE-2021-39197GHSA-w3j4-76qw-wwjm

Cross-Site Request Forgery in better_errors

Priority LOW 39CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Tampering
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-352.

Summary

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.

Why it matters now

EPSS 0.00641 50th percentileScored 2026-11-07
Fix Fixed better_errors (BetterErrors): 2.8.0better_errors (RubyGems): 2.8.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
BetterErrorsbetter_errorsbefore 2.8.02.8.0Patch availableCNA
—better_errors (RubyGems)before 2.8.02.8.0Patch availableGHSA-w3j4-76qw-wwjm
  • better_errors VendorBetterErrors Affected before 2.8.0 Fixed in 2.8.0 Patch available CNA
  • better_errors (RubyGems) Vendor— Affected before 2.8.0 Fixed in 2.8.0 Patch available GHSA-w3j4-76qw-wwjm

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:better_errors_project:better_errors:*:*:*:*:*:ruby:*:*before 2.8.0VulnerableBetter Errors Project
  • cpe:2.3:a:better_errors_project:better_errors:*:*:*:*:*:ruby:*:* Versions before 2.8.0 Vulnerable ·Better Errors Project

Remediation

  • Fix · CNA better_errors (BetterErrors) Fixed in 2.8.0
  • Fix · GHSA-w3j4-76qw-wwjm better_errors (RubyGems) Fixed in 2.8.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-39197
  2. 2026-10-03 Alias added: GHSA-w3j4-76qw-wwjm
  3. 2026-10-21 EPSS moved to the 50th–90th percentile

References

Sources