VYPR
High severityNVD Advisory· Published Dec 18, 2022· Updated Aug 3, 2024

cgriego active_attr Regex boolean_typecaster.rb call denial of service

CVE-2021-4250

Description

A vulnerability classified as problematic has been found in cgriego active_attr up to 0.15.2. This affects the function call of the file lib/active_attr/typecasting/boolean_typecaster.rb of the component Regex Handler. The manipulation of the argument value leads to denial of service. The exploit has been disclosed to the public and may be used. Upgrading to version 0.15.3 is able to address this issue. The name of the patch is dab95e5843b01525444b82bd7b336ef1d79377df. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216207.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
active_attrRubyGems
< 0.15.40.15.4

Affected products

1

Patches

1
dab95e5843b0

fix ReDoS vulnerability (#185)

https://github.com/cgriego/active_attrねずApr 12, 2021via ghsa
1 file changed · +1 1
  • lib/active_attr/typecasting/boolean_typecaster.rb+1 1 modified
    @@ -42,7 +42,7 @@ def call(value)
             case value
             when *FALSE_VALUES then false
             when *NIL_VALUES then nil
    -        when Numeric, /\A[-+]?(0+\.?0*|0*\.?0+)\z/ then !value.to_f.zero?
    +        when Numeric, /\A[-+]?(0++\.?0*|0*+\.?0+)\z/ then !value.to_f.zero?
             else value.present?
             end
           end
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.