Skip to content

Update dependency activesupport to v8 [SECURITY] - #2126

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/rubygems-activesupport-vulnerability
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/rubygems-activesupport-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
activesupport (source, changelog) 7.2.3.2 → 8.0.5.2 age confidence

Active Support: Possible DoS vulnerability in Active Support safe_constantize

CVE-2026-126080 / GHSA-8474-xrp6-wh69

More information

Details

Impact

When constant lookup raises LoadError, ActiveSupport::Inflector#safe_constantize (and String#safe_constantize) builds a regular expression from the requested constant name without escaping it, so a caller that passes untrusted input lets the attacker choose the source of a pattern that the application compiles. Crafted patterns can trigger defects in Ruby's regular expression compiler, possibly leading to a crash of the server process, and repeated requests could keep the application unavailable.

Action Cable passes the channel value of each subscribe command to safe_constantize before any channel lookup, so in the default configuration an unauthenticated client of the Action Cable endpoint can reach this code.

Details

The check that decides whether safe_constantize returns nil or re-raises the LoadError now matches the first segment of the constant name against the error message as a literal string, and no longer compiles a regular expression. It returns the same result as before for constant names that contain no regular expression syntax.

Affected applications

An application is affected if it meets all of these requirements:

  • Mounts Action Cable, which a new Rails application does by default at /cable (config.action_cable.mount_path), or otherwise passes untrusted input to safe_constantize.
  • Accepts Action Cable connections from untrusted clients. ApplicationCable::Connection#connect authenticates nobody unless the application adds a check.
Workarounds

Applications that do not use Action Cable can set config.action_cable.mount_path = nil to remove the endpoint. Applications that use Action Cable can call reject_unauthorized_connection in ApplicationCable::Connection#connect for unauthenticated clients, which limits exposure to authenticated users but does not remove it.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected
  • activesupport < 8.0.5.2
  • activesupport >= 8.1, < 8.1.4.1
Credit

This issue was responsibly reported by Felix Tscheulin (flixt) through HackerOne researcher scheja, and independently by Bucky Wolfe (Igneous), who provided a proof of concept that crashes the server. It was also found by the Anthropic OSS Scanner (ANT-2026-ZUN5KU3Q).

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

rails/rails (activesupport)

v8.0.5.2: 8.0.5.2

Compare Source

Active Support

  • ActiveSupport::Inflector#safe_constantize matches the constant name in a
    LoadError message as a literal string instead of building a Regexp
    from it.

    The name's segments were interpolated unescaped into the pattern, so input
    that reaches safe_constantize, such as the channel identifier in an Action
    Cable subscribe command, chose the source passed to the regexp compiler.

    [GHSA-8474-xrp6-wh69]

    Jeremy Daer

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • Skip attribute names in tag helpers that are blank once converted to a
    string.

    A Symbol such as :" " is not blank, because Symbol#blank? is
    Symbol#empty?, so it reached the escaping step and produced an attribute
    with no name. The asset helpers symbolize their keys, so an ordinary String
    key reached the same place.

    [GHSA-68p9-83h6-5wpj]

    Mike Dalessio

  • Fix strip_tags to encode " and ' in its output.

    strip_tags returns an html_safe string, but was not encoding quotation
    marks. The method now encodes all five HTML-significant characters (&,
    <, >, ", '), consistent with the existing html_safe convention.

    Output used outside HTML, such as in a text template or JSON, now contains
    &quot; and &#&#8203;39; where it contained " and '. CGI.unescapeHTML
    decodes them.

    [GHSA-rq8q-p985-fjq7]

    Mike Dalessio

  • Escape the matched phrase before substituting it into highlight's
    :highlighter.

    A match was copied into each \1 of the highlighter as it appeared in
    the sanitized text, which keeps " and ' as they are, so a match
    containing a quote ended a quoted attribute value such as the
    documented '<a href="search?q=\1">\1</a>' and added attributes of
    its own. Each substituted group now goes through
    ERB::Util.html_escape_once, so quotes in a match render as &quot;
    and &#&#8203;39;. Only the numbered placeholders \0 to \9 are expanded,
    and a match never replaces the > that closes a tag.

    [GHSA-v6rj-xm57-3p59]

    Jeremy Daer

  • Require rails-html-sanitizer 1.7.2 or later.

    With the HTML5 sanitizer, Nokogiri before 1.19.5 left < and >
    unescaped in attribute values. highlight and simple_format, which
    edit the sanitized HTML as a string, could then turn markup inside an
    attribute value into live elements. rails-html-sanitizer 1.7.2 requires
    Loofah 2.25.3, which requires Nokogiri 1.19.5.

    [GHSA-2p2f-4rq4-gjwc]

    Mike Dalessio

Action Pack

  • Apply config.action_dispatch.cookies_same_site_protection to every session
    store.

    ActionDispatch::Session::CacheStore, MemCacheStore and third-party
    stores built on AbstractStore or the session mixins sent session cookies
    with no SameSite attribute. Only CookieStore applied the configured
    default.

    [GHSA-gmj8-hvj3-49mw]

    Jean Boussier

  • Prevent ActionController::Live streams from blocking when a full buffer is
    closed or aborted.

    [GHSA-rwvh-fw6r-pwvp]

    Jeremy Daer

  • Set and extend the Vary header for rendered responses according to the
    request headers used in format negotiation.

    Vary: Accept was only added when the request carried a usable Accept
    header. A response to a request without one, negotiated to HTML or
    JavaScript, could be stored by a shared cache and served to later clients
    that requested a different representation.

    Responses now vary on Accept and X-Requested-With whenever the format is
    not given by the URL. XHR requests without Accept also vary on
    Content-Type, which Rails uses as a legacy format fallback. When
    config.action_dispatch.ignore_accept_header is enabled, responses vary
    only on X-Requested-With.

    These fields are appended to an existing Vary value without duplicating
    fields case-insensitively. Vary: * remains unchanged.

    [GHSA-r9jg-fmfx-2gv6]

    Jeremy Daer

  • Skip writing a CacheStore session that another request deleted while this
    one ran.

    A request that loaded a session from ActionDispatch::Session::CacheStore
    wrote it back when it finished, even after a concurrent reset_session or a
    server-side delete had removed it, so the old session ID worked again.

    [GHSA-2586-8ghr-69fj]

    Mike Dalessio

  • Don't write upgraded cookies to a response that skips the session.

    Reading a signed or encrypted cookie written under a rotated secret, or in
    the format a :hybrid serializer migrates from, writes it back in the
    current format. That write ignored request.session_options[:skip], so a
    response that skips the session, such as the Active Storage proxy's
    public, cacheable response, could still carry the session cookie in
    Set-Cookie. Such a response now leaves the cookie unchanged, and a later
    request that does not skip the session upgrades it. An application that
    skips the session on every request no longer upgrades its signed or
    encrypted cookies. Cookies the application sets are still written.

    [GHSA-x6mj-8jx9-qhqv]

    Mike Dalessio

  • ActionController::Parameters#each_key returns self when given a block.

    It returned the internal ActiveSupport::HashWithIndifferentAccess, which
    does not respond to permitted?, so passing that return value to mass
    assignment skipped the Strong Parameters check. each, each_pair and
    each_value already return self.

    Document that ActionController::Parameters#as_json returns every
    parameter, permitted or not, in a hash that mass assignment does not check.

    [GHSA-wm3x-v3qw-4jh3]

    Mike Dalessio

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Preserve committed proxy responses when a storage error interrupts a
    streamed download.

    [GHSA-4v2w-w6g6-f8f8]

    Jeremy Daer

  • Derive ActiveStorage::Filename#base and #extension from the sanitized
    filename.

    This prevents null bytes and invalid byte sequences in stored filename
    metadata from raising when a blob is opened or represented. Existing blob
    records are handled without a data migration.

    [GHSA-p2pm-g2h6-7j5j]

    Jeremy Daer

  • Ship an ImageMagick security policy and apply it to every ImageMagick
    process MiniMagick spawns.

    ImageMagick chooses a coder from the content of the file it is given, and
    some coders act on files named inside the image rather than on the image
    itself. Active Storage constrained none of them, so an uploaded file could
    reach any coder the host's policy allowed, through the ImageMagick analyzer
    at attach time, with no variant or analyze call in the application.

    Active Storage now ships a policy.xml in
    ActiveStorage::ImageMagick::POLICY_DIRECTORY and prepends that directory
    to MAGICK_CONFIGURE_PATH through MiniMagick.cli_env. ImageMagick applies
    every policy file on its search path, so the shipped policy adds to the
    host's policy rather than replacing it. A MAGICK_CONFIGURE_PATH set in the
    environment or in MiniMagick.cli_env, including by an initializer or
    dotenv, is kept after the shipped directory.

    The shipped policy denies the coders that script ImageMagick (MSL), read
    or delete files other than the image (TEXT, EPHEMERAL), fetch remote
    references (URL, HTTP, HTTPS, FTP), display to a screen (SHOW,
    WIN, PLT), or hand the file to Ghostscript (the PS, EPS, EPT and
    PDF coders, every alias of them, and the gs delegate), or reach a file
    directly (FILE, MPC, XPS, PCL), and it refuses @filename
    indirection. The policy applies to every ImageMagick command MiniMagick
    runs, not only Active Storage's.

    These applications must act:

    • One whose variant processor is :mini_magick has to use mini_magick 5.1
      or later, which applying the policy requires. With an older mini_magick,
      it raises at boot.
    • One that renders PostScript or PDF through ImageMagick has to re-allow
      the gs delegate and the coders it uses in the host's policy.xml. A
      host policy that allows a coder overrides the shipped deny.
    • One that replaces MiniMagick.cli_env after it boots, clears the
      environment with MiniMagick.cli_prefix, or installs its own
      MiniMagick::Shell never receives the shipped policy and has to carry
      its rules in ImageMagick's system policy. So does one that uses
      GraphicsMagick, which does not read ImageMagick policies.

    Every other application needs no change. See "ImageMagick Security Policy"
    in the Active Storage guide.

    [GHSA-f3w6-w445-fwh9]

    Mike Dalessio

  • Enforce the declared content length on Google Cloud Storage direct uploads.

    The signed URL now requires an x-goog-content-length-range header matching the blob's
    byte_size, so Cloud Storage rejects a body of any other size.

    Browsers send the new header, so a bucket's CORS configuration must list
    x-goog-content-length-range in responseHeader, or direct uploads from the browser fail.

    [GHSA-hfr4-8rjc-97m2]

    Mike Dalessio

  • Sign GCS direct uploads with V2 when cache_control is set.

    V4 signatures did not bind the Content-Type or Content-MD5 headers, so the uploader could
    choose the stored Content-Type. Direct-upload URLs with cache_control are no longer limited
    to 7 days, and the client sends Cache-Control unsigned.

    [GHSA-3w93-6hmw-whh4]

    Mike Dalessio

  • Stop an uploaded filename choosing the extension of the tempfile Active
    Storage hands to an external tool.

    ActiveStorage::Blob#open named its tempfile after the uploaded filename,
    extension and all. Tools that select a decoder from the extension alone,
    such as FFmpeg's AviSynth demuxer on .avs, therefore took their
    instructions from the uploader. The extension is now kept only when it
    denotes the blob's recorded media type, and dropped otherwise.

    [GHSA-v924-7rp8-4mxh]

    Mike Dalessio

  • Restrict the formats ffmpeg and ffprobe will open when previewing and
    analyzing video and audio.

    Active Storage now passes -format_whitelist before the input at every
    ffmpeg and ffprobe call site, limiting demuxer selection to common audio and
    video container formats. Configure the list with
    config.active_storage.ffmpeg_allowed_formats, or set it to nil to let
    ffmpeg choose any demuxer it was built with.

    Files in other formats, such as MXF, DV, AC3, WavPack, AU, W64, and raw
    H.264 or MPEG-1/2 video streams, now fail to preview with
    ActiveStorage::PreviewError, and their analysis stores no media metadata
    and logs a warning. Add their demuxers to the list to keep them.

    config.active_storage.ffmpeg_allowed_formats += %w[ mxf ]

    [GHSA-3f4q-8x5m-76v8]

    Mike Dalessio

Action Mailbox

  • Reject Mailgun inbound emails whose timestamp is more than 2 minutes ahead
    of local time.

    [GHSA-5957-c7qm-m469]

    Mike Dalessio

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

v8.0.5.1: 8.0.5.1

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • No changes.

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Disable libvips's unfuzzed image loaders and savers.

    libvips flags some of its loaders and savers as "unfuzzed" or "untrusted", meaning they are only
    safe for trusted content. Active Storage will call Vips.block_untrusted(true) to disable them
    while booting. An application that needs a specific loader or saver may re-enable it in an
    initializer.

    This is a breaking change for applications that process image types with an unfuzzed loader or
    saver. Variant transformation of BMP, ICO, and PSD attachments will raise Vips::Error, and
    analysis of these and other types such as SVG, JPEG XL, JPEG 2000, and Netpbm will no longer
    record width and height. Requesting an unfuzzed output format, typically FITS, JXL, or
    anything delegated to ImageMagick, will also raise Vips::Error. Attaching, storing, and
    downloading are unchanged.

    An application seeing Vips::Error raised during image transformation may wish to remove the
    affected content types from config.active_storage.variable_content_types in an initializer.
    Active Storage will then treat those attachments as not variable and will not generate variants
    for them. This most often matters to an application that transforms images during a request
    rather than in a background job, where the failure surfaces as an error response instead of a
    failed job.

    Rails.application.config.active_storage.variable_content_types -=
      %w[ image/bmp image/vnd.microsoft.icon image/vnd.adobe.photoshop ]

    Applications using the :mini_magick variant processor will see no change in how their
    attachments are processed, but the loaders and savers will be disabled process-wide whenever
    ruby-vips is installed, and the version requirements below will still apply. Such an application
    may remove ruby-vips from its Gemfile to avoid both.

    The minimum supported version of libvips is now 8.13, and the minimum supported version of
    ruby-vips is now 2.2.1. These are the earliest versions that are capable of disabling untrusted
    operations. When ruby-vips is installed and either minimum is not met, Active Storage will raise
    a RuntimeError while booting rather than run in an unsecurable environment.

    [GHSA-xr9x-r78c-5hrm]
    [CVE-2026-66066]

    Mike Dalessio

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

v8.0.5: 8.0.5

Compare Source

Active Support

  • Fix inflections to better handle overlapping acronyms.

    ActiveSupport::Inflector.inflections(:en) do |inflect|
      inflect.acronym "USD"
      inflect.acronym "USDC"
    end
    
    "USDC".underscore # => "usdc"

    Said Kaldybaev

  • Silence Dalli 4.0+ warning when using ActiveSupport::Cache::MemCacheStore.

    zzak

  • Make delegate and delegate_missing_to work in BasicObject subclasses.

    Rafael Mendonça França

  • Fix ActiveSupport::Inflector.humanize with international characters.

    ActiveSupport::Inflector.humanize("áÉÍÓÚ")  # => "Áéíóú"
    ActiveSupport::Inflector.humanize("аБВГДЕ") # => "Абвгде"

    Jose Luis Duran

Active Model

  • No changes.

Active Record

  • Fix insert_all and upsert_all log message when called on anonymous classes.

    Gabriel Sobrinho

  • Respect ActiveRecord::SchemaDumper.ignore_tables when dumping SQLite virtual tables.

    Hans Schnedlitz

  • Restore previous instrumenter after execute_or_skip

    FutureResult#execute_or_skip replaces the thread's instrumenter with an
    EventBuffer to collect events published during async query execution.
    If the global async executor is saturated and the caller_runs fallback
    executes the task on the calling thread, we need to make sure the previous
    instrumenter is restored or the stale EventBuffer would stay in place and
    permanently swallow all subsequent sql.active_record notifications on
    that thread.

    Rosa Gutierrez

  • Fix Ruby 4.0 delegator warning when calling inspect on ActiveRecord::Type::Serialized.

    Hammad Khan

  • Fix support for table names containing hyphens.

    Evgeniy Demin

  • Fix column deduplication for SQLite3 and PostgreSQL virtual (generated) columns.

    Column#== and Column#hash now account for virtual? so that the
    Deduplicable registry does not treat a generated column and a regular
    column with the same name and type as identical. Previously, if a
    generated column was registered first, a regular column on a different
    table could be deduplicated to the generated instance, silently
    excluding it from INSERT/UPDATE statements.

    Jay Huber

  • Fix merging relations with arel equality predicates with null relations.

    fatkodima

  • Fix SQLite3 schema dump for non-autoincrement integer primary keys.

    Previously, schema.rb should incorrectly restore that table with an auto incrementing
    primary key.

    Chris Hasiński

  • Fix PostgreSQL schema_search_path not being reapplied after reset! or reconnect!.

    The schema_search_path configured in database.yml is now correctly
    reapplied instead of falling back to PostgreSQL defaults.

    Tobias Egli

  • Ensure batched preloaded associations accounts for klass when grouping to avoid issues with STI.

    zzak, Stjepan Hadjic

  • Fix ActiveRecord::SoleRecordExceeded#record to return the relation.

    This was the case until Rails 7.2, but starting from 8.0 it
    started mistakenly returning the model class.

    Jean Boussier

  • Improve PostgreSQLAdapter resilience to Timeout.timeout.

    Better handle asynchronous exceptions being thrown inside
    the reconnect! method.

    This may fixes some deep errors such as:

    undefined method `key?' for nil:NilClass (NoMethodError)
              if !type_map.key?(oid)
    

    Jean Boussier

  • Fix eager_load when loading has_many assocations with composite primary keys.

    This would result in some records being loaded multiple times.

    Martin-Alexander

Action View

  • Fix encoding errors for string locals containing non-ASCII characters.

    Kataoka Katsuki

  • Fix collection caching to only forward expires_in argument if explicitly set.

    Pieter Visser

  • Fix file_field to join mime types with a comma when provided as Array

    file_field(:article, :image, accept: ['image/png', 'image/gif', 'image/jpeg'])

    Now behaves likes:

    file_field(:article, :image, accept: 'image/png,image/gif,image/jpeg')
    

    Bogdan Gusiev

  • Fix strict locals parsing to handle multiline definitions.

    Said Kaldybaev

Action Pack

  • Add config.action_controller.live_streaming_excluded_keys to control execution state sharing in ActionController::Live.

    When using ActionController::Live, actions are executed in a separate thread that shares
    state from the parent thread. This new configuration allows applications to opt-out specific
    state keys that should not be shared.

    This is useful when streaming inside a connected_to block, where you may want
    the streaming thread to use its own database connection context.

    # config/application.rb
    config.action_controller.live_streaming_excluded_keys = [:active_record_connected_to_stack]

    By default, all keys are shared.

    Eileen M. Uchitelle

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Fix ActiveStorage::Blob content type predicate methods to handle nil.

    Daichi KUDO

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • Fixed the rails notes command to properly extract notes in CSS files.

    David White

  • Fixed the default Dockerfile to properly include the vendor/ directory during bundle install.

    Zhong Sheng

Guides

  • No changes.

v8.0.4.1: 8.0.4.1

Compare Source

Active Support

  • Reject scientific notation in NumberConverter

    [CVE-2026-33176]

    Jean Boussier

  • Fix SafeBuffer#% to preserve unsafe status

    [CVE-2026-33170]

    Jean Boussier

  • Improve performance of NumberToDelimitedConverter

    [CVE-2026-33169]

    Jean Boussier

Active Model

  • No changes.

Active Record

  • No changes.

Action View

  • Skip blank attribute names in tag helpers to avoid generating invalid HTML.

    [CVE-2026-33168]

    Mike Dalessio

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • Filter user supplied metadata in DirectUploadController

    [CVE-2026-33173]

    Jean Boussier

  • Configurable maxmimum streaming chunk size

    Makes sure that byte ranges for blobs don't exceed 100mb by default.
    Content ranges that are too big can result in denial of service.

    [CVE-2026-33174]

    Gannon McGibbon

  • Limit range requests to a single range

    [CVE-2026-33658]

    Jean Boussier

  • Prevent path traversal in DiskService.

    DiskService#path_for now raises an InvalidKeyError when passed keys with dot segments (".",
    ".."), or if the resolved path is outside the storage root directory.

    #path_for also now consistently raises InvalidKeyError if the key is invalid in any way, for
    example containing null bytes or having an incompatible encoding. Previously, the exception
    raised may have been ArgumentError or Encoding::CompatibilityError.

    DiskController now explicitly rescues InvalidKeyError with appropriate HTTP status codes.

    [CVE-2026-33195]

    Mike Dalessio

  • Prevent glob injection in DiskService#delete_prefixed.

    Escape glob metacharacters in the resolved path before passing to Dir.glob.

    Note that this change breaks any existing code that is relying on delete_prefixed to expand
    glob metacharacters. This change presumes that is unintended behavior (as other storage services
    do not respect these metacharacters).

    [CVE-2026-33202]

    Mike Dalessio

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

v8.0.4: 8.0.4

Compare Source

Active Support

  • Fix Enumerable#sole to return the full tuple instead of just the first element of the tuple.

    Olivier Bellone

  • Fix parallel tests hanging when worker processes die abruptly.

    Previously, if a worker process was killed (e.g., OOM killed, kill -9) during parallel
    test execution, the test suite would hang forever waiting for the dead worker.

    Joshua Young

  • Fix NameError when class_attribute is defined on instance singleton classes.

    Previously, calling class_attribute on an instance's singleton class would raise
    a NameError when accessing the attribute through the instance.

    object = MyClass.new
    object.singleton_class.class_attribute :foo, default: "bar"
    object.foo # previously raised NameError, now returns "bar"

    Joshua Young

Active Model

  • No changes.

Active Record

  • Fix SQLite3 data loss during table alterations with CASCADE foreign keys.

    When altering a table in SQLite3 that is referenced by child tables with
    ON DELETE CASCADE foreign keys, ActiveRecord would silently delete all
    data from the child tables. This occurred because SQLite requires table
    recreation for schema changes, and during this process the original table
    is temporarily dropped, triggering CASCADE deletes on child tables.

    The root cause was incorrect ordering of operations. The original code
    wrapped disable_referential_integrity inside a transaction, but
    PRAGMA foreign_keys cannot be modified inside a transaction in SQLite -
    attempting to do so simply has no effect. This meant foreign keys remained
    enabled during table recreation, causing CASCADE deletes to fire.

    The fix reverses the order to follow the official SQLite 12-step ALTER TABLE
    procedure: disable_referential_integrity now wraps the transaction instead
    of being wrapped by it. This ensures foreign keys are properly disabled
    before the transaction starts and re-enabled after it commits, preventing
    CASCADE deletes while maintaining data integrity through atomic transactions.

    Ruy Rocha

  • Add support for bound SQL literals in CTEs.

    Nicolas Bachschmidt

  • Fix belongs_to associations not to clear the entire composite primary key.

    When clearing a belongs_to association that references a model with composite primary key,
    only the optional part of the key should be cleared.

    zzak

  • Fix invalid records being autosaved when distantly associated records are marked for deletion.

    Ian Terrell, axlekb AB

Action View

  • Restore add_default_name_and_id method.

    Hartley McGuire

Action Pack

  • Submit test requests using as: :html with Content-Type: x-www-form-urlencoded

    Sean Doyle

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • No changes.

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

v8.0.3: 8.0.3

Compare Source

Active Support

  • ActiveSupport::FileUpdateChecker does not depend on Time.now to prevent unnecessary reloads with time travel test helpers

    Jan Grodowski

  • Fix ActiveSupport::BroadcastLogger from executing a block argument for each logger (tagged, info, etc.).

    Jared Armstrong

  • Make ActiveSupport::Logger #freeze-friendly.

    Joshua Young

  • Fix ActiveSupport::HashWithIndifferentAccess#transform_keys! removing defaults.

    Hartley McGuire

  • Fix ActiveSupport::HashWithIndifferentAccess#tranform_keys! to handle collisions.

    If the transformation would result in a key equal to another not yet transformed one,
    it would result in keys being lost.

    Before:

    >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
    => {"c" => 1}

    After:

    >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
    => {"c" => 1, "d" => 2}

    Jason T Johnson, Jean Boussier

  • Fix ActiveSupport::Cache::MemCacheStore#read_multi to handle network errors.

    This method specifically wasn't handling network errors like other codepaths.

    Alessandro Dal Grande

  • Fix configuring RedisCacheStore with raw: true.

    fatkodima

  • Fix Enumerable#sole for infinite collections.

    fatkodima

Active Model

  • Fix has_secure_password to perform confirmation validation of the password even when blank.

    The validation was incorrectly skipped when the password only contained whitespace characters.

    Fabio Sangiovanni

Active Record

  • Fix query cache for pinned connections in multi threaded transactional tests

    When a pinned connection is used across separate threads, they now use a separate cache store
    for each thread.

    This improve accuracy of system tests, and any test using multiple threads.

    Heinrich Lee Yu, Jean Boussier

  • Don't add id_value attribute alias when attribute/column with that name already exists.

    Rob Lewis

  • Fix false positive change detection involving STI and polymorphic has one relationships.

    Polymorphic has_one relationships would always be considered changed when defined in a STI child
    class, causing nedless extra autosaves.

    David Fritsch

  • Skip calling PG::Connection#cancel in cancel_any_running_query
    when using libpq >= 18 with pg < 1.6.0, due to incompatibility.
    Rollback still runs, but may take longer.

    Yasuo Honda, Lars Kanis

  • Fix stale association detection for polymorphic belongs_to.

    Florent Beaurain, Thomas Crambert

  • Fix removal of PostgreSQL version comments in structure.sql for latest PostgreSQL versions which include \restrict

    Brendan Weibrecht

  • Allow setting schema_format in database configuration.

    primary:
      schema_format: ruby
    

    Useful in multi-database setups to have different formats per-database.

    T S Vallender

  • Use ntuples to populate row_count instead of count for Postgres

    Jonathan Calvert

  • Fix #merge with #or or #and and a mixture of attributes and SQL strings resulting in an incorrect query.

    base = Comment.joins(:post).where(user_id: 1).where("recent = 1")
    puts base.merge(base.where(draft: true).or(Post.where(archived: true))).to_sql

    Before:

    SELECT "comments".* FROM "comments"
    INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
    WHERE (recent = 1)
    AND (
      "comments"."user_id" = 1
      AND (recent = 1)
      AND "comments"."draft" = 1
      OR "posts"."archived" = 1
    )

    After:

    SELECT "comments".* FROM "comments"
    INNER JOIN "posts" ON "posts"."id" = "comments"."post_id"
    WHERE "comments"."user_id" = 1
    AND (recent = 1)
    AND (
      "comments"."user_id" = 1
      AND (recent = 1)
      AND "comments"."draft" = 1
      OR "posts"."archived" = 1
    )

    Joshua Young

  • Fix inline has_and_belongs_to_many fixtures for tables with composite primary keys.

    fatkodima

  • Fix migration log message for down operations.

    Bernardo Barreto

  • Prepend extra_flags in postgres' structure_load

    When specifying structure_load_flags with a postgres adapter, the flags
    were appended to the default flags, instead of prepended.
    This caused issues with flags not being taken into account by postgres.

    Alice Loeser

  • Fix annotate comments to propagate to update_all/delete_all.

    fatkodima

  • Fix checking whether an unpersisted record is include?d in a strictly
    loaded has_and_belongs_to_many association.

    Hartley McGuire

  • create_or_find_by will now correctly rollback a transaction.

    When using create_or_find_by, raising a ActiveRecord::Rollback error
    in a after_save callback had no effect, the transaction was committed
    and a record created.

    Edouard Chin

  • Gracefully handle Timeout.timeout firing during connection configuration.

    Use of Timeout.timeout could result in improperly initialized database connection.

    This could lead to a partially configured connection being used, resulting in various exceptions,
    the most common being with the PostgreSQLAdapter raising undefined method 'key?' for nil
    or TypeError: wrong argument type nil (expected PG::TypeMap).

    Jean Boussier

  • Fix stale state for composite foreign keys in belongs_to associations.

    Varun Sharma

Action View

  • Fix label with for option not getting prefixed by form namespace value

    Abeid Ahmed, Hartley McGuire

  • Fix javascript_include_tag type option to accept either strings and symbols.

    javascript_include_tag "application", type: :module
    javascript_include_tag "application", type: "module"

    Previously, only the string value was recognized.

    Jean Boussier

  • Fix excerpt helper with non-whitespace separator.

    Jonathan Hefner

Action Pack

  • URL helpers for engines mounted at the application root handle SCRIPT_NAME correctly.

    Fixed an issue where SCRIPT_NAME is not applied to paths generated for routes in an engine
    mounted at "/".

    Mike Dalessio

  • Fix Rails.application.reload_routes! from clearing almost all routes.

    When calling Rails.application.reload_routes! inside a middleware of
    a Rake task, it was possible under certain conditions that all routes would be cleared.
    If ran inside a middleware, this would result in getting a 404 on most page you visit.
    This issue was only happening in development.

    Edouard Chin

  • Address rack 3.2 deprecations warnings.

    warning: Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack.
    Please use :unprocessable_content instead.
    

    Rails API will transparently convert one into the other for the foreseeable future.

    Earlopain, Jean Boussier

  • Support hash-source in Content Security Policy.

    madogiwa

  • Always return empty body for HEAD requests in PublicExceptions and
    DebugExceptions.

    This is required by Rack::Lint (per RFC9110).

    Hartley McGuire

Active Job

  • Include the actual Active Job locale when serializing rather than I18n locale.

    Adrien S

  • Fix retry_job instrumentation when using :test adapter for Active Job.

    fatkodima

Action Mailer

  • No changes.

Action Cable

  • Fixed compatibility with redis gem 5.4.1

    Jean Boussier

  • Fixed a possible race condition in stream_from.

    OuYangJinTing

Active Storage

  • Address deprecation of Aws::S3::Object#upload_stream in ActiveStorage::Service::S3Service.

    Joshua Young

  • Fix config.active_storage.touch_attachment_records to work with eager loading.

    fatkodima

Action Mailbox

  • No changes.

Action Text

  • Add rollup-plugin-terser as a dev dependency.

    Édouard Chin

Railties

  • Fix polymorphic_url and polymorphic_path not working when routes are not loaded.

    Édouard Chin

  • Fix Rails console to not override user defined IRB_NAME.

    Only change the prompt name if it hasn't been customized in .irbrc.

    Jarrett Lusso

Guides

  • No changes.

v8.0.2.1: 8.0.2.1

Compare Source

Active Support

  • No changes.

Active Model

  • No changes.

Active Record

  • Call inspect on ids in RecordNotFound error

    [CVE-2025-55193]

    Gannon McGibbon, John Hawthorn

Action View

  • No changes.

Action Pack

  • No changes.

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

Remove dangerous transformations

[CVE-2025-24293]

*Zack Deveau*

Action Mailbox

  • No changes.

Action Text

  • No changes.

Railties

  • No changes.

Guides

  • No changes.

v8.0.2: 8.0.2

Compare Source

Active Support

  • Fix setting to_time_preserves_timezone from new_framework_defaults_8_0.rb.

    fatkodima

  • Fix Active Support Cache fetch_multi when local store is active.

    fetch_multi now properly yield to the provided block for missing entries
    that have been recorded as such in the local store.

    Jean Boussier

  • Fix execution wrapping to report all exceptions, including Exception.

    If a more serious error like SystemStackError or NoMemoryError happens,
    the error reporter should be able to report these kinds of exceptions.

    Gannon McGibbon

  • Fix RedisCacheStore and MemCacheStore to also handle connection pool related errors.

    These errors are rescued and reported to Rails.error.

    Jean Boussier

  • Fix ActiveSupport::Cache#read_multi to respect version expiry when using local cache.

    zzak

  • Fix ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor configuration of on_rotation callback.

    verifier.rotate(old_secret).on_rotation { ... }

    Now both work as documented.

    Jean Boussier

  • Fix ActiveSupport::MessageVerifier to always be able to verify both URL-safe and URL-unsafe payloads.

    This is to allow transitioning seemlessly from either configuration without immediately invalidating
    all previously generated signed messages.

    Jean Boussier, Florent Beaurain, Ali Sepehri

  • Fix cache.fetch to honor the provided expiry when :race_condition_ttl is used.

    cache.fetch("key", expires_in: 1.hour, race_condition_ttl: 5.second) do
      "something"
    end

    In the above example, the final cache entry would have a 10 seconds TTL instead
    of the requested 1 hour.

    Dhia

  • Better handle procs with splat arguments in set_callback.

    Radamés Roriz

  • Fix String#mb_chars to not mutate the receiver.

    Previously it would call force_encoding on the receiver,
    now it dups the receiver first.

    Jean Boussier

  • Improve ErrorSubscriber to also mark error causes as reported.

    This avoid some cases of errors being reported twice, notably in views because of how
    errors are wrapped in ActionView::Template::Error.

    Jean Boussier

  • Fix Module#module_parent_name to return the correct name after the module has been named.

    When called on an anonymous module, the return value wouldn't change after the module was given a name
    later by being assigned to a constant.

    mod = Module.new
    mod.module_parent_name # => "Object"
    MyModule::Something = mod
    mod.module_parent_name # => "MyModule"

    Jean Boussier

Active Model

  • No changes.

Active Record

  • Fix inverting rename_enum_value when :from/:to are provided.

    fatkodima

  • Prevent persisting invalid record.

    Edouard Chin

  • Fix inverting drop_table without options.

    fatkodima

  • Fix count with group by qualified name on loaded relation.

    Ryuta Kamizono

  • Fix sum with qualified name on loaded relation.

    Chris Gunther

  • The SQLite3 adapter quotes non-finite Numeric values like "Infinity" and "NaN".

    Mike Dalessio

  • Handle libpq returning a database version of 0 on no/bad connection in PostgreSQLAdapter.

    Before, this version would be cached and an error would be raised during connection configuration when
    comparing it with the minimum required version for the adapter. This meant that the connection could
    never be successfully configured on subsequent reconnection attempts.

    Now, this is treated as a connection failure consistent with libpq, raising a ActiveRecord::ConnectionFailed
    and ensuring the version isn't cached, which allows the version to be retrieved on the next connection attempt.

    Joshua Young, Rian McGuire

  • Fix error handling during connection configuration.

    Active Record wasn't properly handling errors during the connection configuration phase.
    This could lead to a partially configured connection being used, resulting in various exceptions,
    the most common being with the PostgreSQLAdapter raising undefined method key?' for nilorTypeError: wrong argument type nil (expected PG::TypeMap)`.

    Jean Boussier

  • Fix a case where a non-retryable query could be marked retryable.

    Hartley McGuire

  • Handle circular references when autosaving associations.

    zzak

  • PoolConfig no longer keeps a reference to the connection class.

    Keeping a reference to the class caused subtle issues when combined with reloading in
    development. Fixes #​54343.

    Mike Dalessio

  • Fix SQL notifications sometimes not sent when using async queries.

    Post.async_count
    ActiveSupport::Notifications.subscribed(->(*) { "Will never reach here" }) do
      Post.count
    end

    In rare circumstances and under the right race condition, Active Support notifications
    would no longer be dispatched after using an asynchronous query.
    This is now fixed.

    Edouard Chin

  • Fix support for PostgreSQL enum types with commas in their name.

    Arthur Hess

  • Fix inserts on MySQL with no RETURNING support for a table with multiple auto populated columns.

    Nikita Vasilevsky

  • Fix joining on a scoped association with string joins and bind parameters.

    class Instructor < ActiveRecord::Base
      has_many :instructor_roles, -> { active }
    end
    
    class InstructorRole < ActiveRecord::Base
      scope :active, -> {
        joins("JOIN students ON instructor_roles.student_id = students.id")
        .where(students { status: 1 })
      }
    end
    
    Instructor.joins(:instructor_roles).first

    The above example would result in ActiveRecord::StatementInvalid because the
    active scope bind parameters would be lost.

    Jean Boussier

  • Fix a potential race condition with system tests and transactional fixtures.

    Sjoerd Lagarde

  • Fix autosave associations to no longer validated unmodified associated records.

    Active Record was incorrectly performing validation on associated record that
    weren't created nor modified as part of the transaction:

    Post.create!(author: User.find(1)) # Fail if user is invalid

    Jean Boussier

  • Remember when a database connection has recently been verified (for
    two seconds, by default), to avoid repeated reverifications during a
    single request.

    This should recreate a similar rate of verification as in Rails 7.1,
    where connections are leased for the duration of a request, and thus
    only verified once.

    Matthew Draper

Action View

  • Respect html_options[:form] when collection_checkboxes generates the
    hidden <input>.

    Riccardo Odone

  • Layouts have access to local variables passed to render.

    This fixes #​31680 which was a regression in Rails 5.1.

    Mike Dalessio

  • Argument errors related to strict locals in templates now raise an
    ActionView::StrictLocalsError, and all other argument errors are reraised as-is.

    Previously, any ArgumentError raised during template rendering was swallowed during strict
    local error handling, so that an ArgumentError unrelated to strict locals (e.g., a helper
    method invoked with incorrect arguments) would be replaced by a similar ArgumentError with an
    unrelated backtrace, making it difficult to debug templates.

    Now, any ArgumentError unrelated to strict locals is reraised, preserving the original
    backtrace for developers.

    Also note that ActionView::StrictLocalsError is a subclass of ArgumentError, so any existing
    code that rescues ArgumentError will continue to work.

    Fixes #​52227.

    Mike Dalessio

  • Fix stack overflow error in dependency tracker when dealing with circular dependencies

    Jean Boussier

Action Pack

  • Improve with_routing test helper to not rebuild the middleware stack.

    Otherwise some middleware configuration could be lost.

    Édouard Chin

  • Add resource name to the ArgumentError that's raised when invalid :only or :except options are given to #resource or #resources

    This makes it easier to locate the source of the problem, especially for routes drawn by gems.

    Before:

    :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
    

    After:

    Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
    

    Jeremy Green

  • Fix url_for to handle :path_params gracefully when it's not a Hash.

    Prevents various security scanners from causing exceptions.

    Martin Emde

  • Fix ActionDispatch::Executor to unwrap exceptions like other error reporting middlewares.

    Jean Boussier

Active Job

  • No changes.

Action Mailer

  • No changes.

Action Cable

  • No changes.

Active Storage

  • A Blob will no longer autosave associated Attachment.

    This fixes an issue where a record with an attachment would have
    its dirty attributes reset, preventing your after commit callbacks
    on that record to behave as expected.

    Note that this change doesn't require any changes on your application
    and is supposed to be internal. Active Storage Attachment will continue
    to be autosaved (through a different relation).

    Edouard-chin

Action Mailbox

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (in timezone Europe/London)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the security label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants