Bump decimal to 3.x to fix unauthenticated DoS (GHSA-rhv4-8758-jx7v)#1152
Bump decimal to 3.x to fix unauthenticated DoS (GHSA-rhv4-8758-jx7v)#1152daveshah wants to merge 1 commit into
Conversation
`decimal` versions `< 3.0.0` do not bound the exponent on parsed input, so a value such as `"1e10000000"` parses fine but then allocates gigabytes of memory during arithmetic, rounding, `to_integer/1`, or `to_string/2`. This is an unauthenticated remote DoS for any code path that accepts a user-supplied decimal — see GHSA-rhv4-8758-jx7v (moderate severity, patched in decimal 3.0.0). `mix deps.audit` flags the previously locked `decimal 2.3.0`. The only fix is upgrading to the 3.x line, so the `~> 2.1` requirement is widened to `~> 3.0`. This cascades into transitive bumps required for resolution: `jason` 1.4.4 -> 1.4.5 and `adbc` 0.7.8 -> 0.12.1, both of which now allow `decimal ~> 3.0`. `mix_audit` is also added as a dev/test dependency so the vulnerability scan can be run (and wired into CI) going forward. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
😹 Yes it does! I see you went for a bump to 3.0 rather than 3.1, and forcing the issue rather than the I'm happy to go whichever way @akoutmos wants |
Happy with whatever the outcome - just looking forward to removing a |
|
Hey there and thanks for the PR! I'm going to close it in favor of #1153 as there is version 2.4 that also contains the security fix. With regards to |
decimalversions< 3.0.0do not bound the exponent on parsed input, so a value such as"1e10000000"parses fine but then allocates gigabytes of memory during arithmetic, rounding,to_integer/1, orto_string/2. This is an unauthenticated remote DoS for any code path that accepts a user-supplied decimal — see GHSA-rhv4-8758-jx7v (moderate severity, patched in decimal 3.0.0).mix deps.auditflags the previously lockeddecimal 2.3.0. The only fix is upgrading to the 3.x line, so the~> 2.1requirement is widened to~> 3.0. This cascades into transitive bumps required for resolution:jason1.4.4 -> 1.4.5 andadbc0.7.8 -> 0.12.1, both of which now allowdecimal ~> 3.0.mix_auditis also added as a dev/test dependency so the vulnerability scan can be run (and wired into CI) going forward.