When a constant lookup raises a `LoadError`, the `ActiveSupport::Inflector#safe constantize` function (and `String#safe constantize`) creates a regular expression from the requested constant name without proper escaping. An attacker providing untrusted input can control the pattern the application compiles, potentially triggering defects in the Ruby regular expression compiler. This can lead to a server process crash, and repeated requests may result in a denial of service. In applications using Action Cable, an unauthenticated client can trigger this behavior via the `channel` variable in a `subscribe` command sent to the `/cable` endpoint.