CVE Vulnerabilities

CVE-2021-22885

Generation of Error Message Containing Sensitive Information

Published: May 27, 2021 | Modified: Nov 21, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

A possible information disclosure / unintended method execution vulnerability in Action Pack >= 2.0.0 when using the redirect_to or polymorphic_urlhelper with untrusted user input.

Weakness

The product generates an error message that includes sensitive information about its environment, users, or associated data.

Affected Software

NameVendorStart VersionEnd Version
RailsRubyonrails5.2.0.0 (including)5.2.4.6 (excluding)
RailsRubyonrails6.0.0.0 (including)6.0.3.7 (excluding)
RailsRubyonrails6.1.0.0 (including)6.1.3.1 (excluding)
Red Hat Satellite 6.10 for RHEL 7RedHattfm-rubygem-actionpack-0:6.0.3.7-1.el7sat*
RailsUbuntubionic*
RailsUbuntufocal*
RailsUbuntugroovy*
RailsUbuntuhirsute*
RailsUbuntuimpish*
RailsUbuntukinetic*
RailsUbuntulunar*
RailsUbuntumantic*
RailsUbuntuoracular*
RailsUbuntuplucky*
RailsUbuntutrusty*
RailsUbuntuxenial*
Rails-4.0Ubuntutrusty*
Ruby-actionpack-3.2Ubuntutrusty*
Ruby-activemodel-3.2Ubuntutrusty*
Ruby-activerecord-3.2Ubuntutrusty*
Ruby-activesupport-3.2Ubuntutrusty*
Ruby-rails-3.2Ubuntutrusty*

Potential Mitigations

  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.

References