Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rails/rails
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.1.2
Choose a base ref
...
head repository: rails/rails
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.1.2.1
Choose a head ref
  • 14 commits
  • 56 files changed
  • 4 contributors

Commits on Mar 17, 2026

  1. Lock some dependencies

    byroot committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    bc07f97 View commit details
    Browse the repository at this point in the history
  2. 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]
    [GHSA-r46p-8f7g-vvvg]
    gmcgibbon authored and jhawthorn committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    42012ea View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2026

  1. ActiveStorage::Streaming limit range requests to a single range

    Multi-Range requests can easily be abused DoS the service.
    
    The backend could and should be optimized to handle multi-range
    requests better, but ultimately there isn't a whole lot of legitimate
    uses for them, and if you are exposing Active Storage to your
    users with large files, you should consider not using the default
    proxy.
    
    [CVE-2026-33658]
    [GHSA-p9fm-f462-ggrg]
    byroot authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    85ec5b1 View commit details
    Browse the repository at this point in the history
  2. NumberConverter: reject scientific notation

    BigDecimal support scientific notation, which allow expressing
    extremly large numbers with just a few bytes of input.
    
    This could be exploited to DOS a service if somehow user input is
    passed to number converter.
    
    [CVE-2026-33176]
    [GHSA-2j26-frm8-cmj9]
    byroot authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    19dbab5 View commit details
    Browse the repository at this point in the history
  3. Active Storage: Filter user supplied metadata in DirectUploadController

    For direct uploads, metadata is an entirely user controlled blob.
    However over time the `metadata` store has been used to record internal
    state such as `analyzed` etc.
    
    Hence we shouldn't let users set these keys.
    
    This is a simple fix that is easy to backport, however the cleaner
    long term fix should be to stop using the metadata store for internal
    state, and instead use proper materialized columns.
    
    [CVE-2026-33173]
    [GHSA-qcfx-2mfw-w4cg]
    byroot authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    d9502f5 View commit details
    Browse the repository at this point in the history
  4. Fix SafeBuffer#% to preserve unsafe status

    Formatting an unsafe buffer should produce an unsafe buffer.
    
    [CVE-2026-33170]
    [GHSA-89vf-4333-qx8v]
    byroot authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    50d732a View commit details
    Browse the repository at this point in the history
  5. 1 Configuration menu
    Copy the full SHA
    ec1a0e2 View commit details
    Browse the repository at this point in the history
  6. Prevent path traversal in ActiveStorage DiskService

    When DiskService receives a blob key containing path traversal segments
    (e.g. `../../etc/passwd`), the resolved filesystem path can escape the
    storage root directory. This allows reading or writing arbitrary files on
    the server.
    
    `DiskService#path_for` is the primary filesystem security check for all
    disk storage operations. This change adds path traversal protection:
    
    - `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.
    
    Document that custom blob keys are trusted strings. These changes are
    defense-in-depth measures intended to limit the blast radius of
    developer errors, and are not a trust boundary.
    
    [CVE-2026-33195]
    [GHSA-9xrj-h377-fr87]
    flavorjones authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    9b06fbc View commit details
    Browse the repository at this point in the history
  7. Prevent glob injection in ActiveStorage DiskService#delete_prefixed

    `Blob#delete` calls `DiskService#delete_prefixed` with a string that
    includes the blob key. In turn, `DiskService#delete_prefixed` pass
    that string to `Dir.glob`.
    
    If a developer is generating custom blob keys (or has mistakenly
    allowed untrusted input to be used as a blob key) and that key
    contains glob metacharacters, then it may be possible to delete
    unintended files. It may also be possible to delete unintended files
    if `delete_prefixed` is called directly with a prefix containing glob
    metacharacters.
    
    Update `delete_prefixed` to:
    
    - Update `delete_prefixed` to escape glob metacharacters in the
      resolved path before passing to `Dir.glob`
    - Extract a private method `escape_glob_metacharacters`.
    
    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).
    
    Also note that this is a defense-in-depth measure to limit the blast
    radius of malicious keys, and is not a trust boundary.
    
    [CVE-2026-33202]
    [GHSA-73f9-jhhh-hr5m]
    flavorjones authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    8c9676b View commit details
    Browse the repository at this point in the history
  8. Skip blank attribute names in Action View tag helpers

    When a blank string is used as an HTML attribute name in tag helpers,
    `xml_name_escape` returns an empty string, producing malformed HTML
    that may be susceptible to mXSS attacks.
    
    `tag_options` now skips blank keys in all three iteration paths: the
    top-level options loop, and (for consistency) the inner data/aria hash
    loops.
    
    [CVE-2026-33168]
    [GHSA-v55j-83pf-r9cq]
    flavorjones authored and jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    63f5ad8 View commit details
    Browse the repository at this point in the history
  9. Fix XSS in debug exceptions copy-to-clipboard

    The exception message was output with `raw` inside a <script> tag. If an
    attacker is able to trigger an exception message containing HTML it
    would be rendered to the page.
    
    This affects development error page and in most cases is not reachable
    in production.
    
    Use default ERB escaping instead of `raw` to ensure the message is
    HTML-escaped.
    
    [CVE-2026-33167]
    [GHSA-pgm4-439c-5jp6]
    jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    6752711 View commit details
    Browse the repository at this point in the history
  10. Update CHANGELOG (8.1 only)

    jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    e91694b View commit details
    Browse the repository at this point in the history
  11. Update changelog

    jhawthorn committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    1c7d1cf View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1db4b89 View commit details
    Browse the repository at this point in the history
Loading