CVE-2026-59825: Ruby Mutate Shared Constant In Place Without Copy

$CONST is mutated in place through `.tap` without an intervening `.dup`/`.clone`. Upper-case Ruby constants are shared, process-global objects and are frequently frozen (e.g. OpenSSL::SSL::SSLContext::DEFAULT_PARAMS, which SSLContext#set_params consumes for every newly created TLS context). Assigning through `.tap`'s block parameter writes through to that sh

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0Ruby
greprules fetch cve-2026-59825-ruby-mutate-shared-constant-in-place-without-copy --engine opengrep

Description

$CONST is mutated in place through `.tap` without an intervening `.dup`/`.clone`. Upper-case Ruby constants are shared, process-global objects and are frequently frozen (e.g. OpenSSL::SSL::SSLContext::DEFAULT_PARAMS, which SSLContext#set_params consumes for every newly created TLS context). Assigning through `.tap`'s block parameter writes through to that sh