{"source":"rails/rails","advisories":[{"id":"GHSA-f3w6-w445-fwh9","cve":"CVE-2026-126082","title":"Possible arbitrary file write and read in Active Storage image analysis","description":"### Impact\nA Rails application that processes attachments with ImageMagick may allow an unauthenticated attacker to write arbitrary files on the server and, when attachments are stored with the Disk service, to read arbitrary files readable by the application process. Those files typically include `secret_key_base` and credentials for external systems, which may in turn allow escalation to remote code execution or lateral movement to those systems.\n\n### Details\nImageMagick selects 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 ImageMagick's coders, and the ImageMagick analyzer runs when a file is attached, so an attacker who can upload a crafted file may be able to invoke one. Attaching the upload is sufficient; no variant, preview, or `analyze` call is required. One specific attack chain has been reported to us, but we do not assume it is the only one that exists.\n\nThe fixed versions ship an ImageMagick security policy and prepend its directory to `MAGICK_CONFIGURE_PATH` through `MiniMagick.cli_env`, so every ImageMagick process that MiniMagick spawns applies it. The policy denies the `MSL` scripting coder, the coders that read or delete files other than the image, fetch remote or local references, or display to a screen, every coder backed by Ghostscript together with the `gs` delegate, and `@filename` indirection. ImageMagick applies every `policy.xml` on its search path, so the shipped policy adds to the host's policy rather than replacing it. The policy applies to every ImageMagick command that MiniMagick runs, not only those of Active Storage. See the `activestorage` CHANGELOG and \"ImageMagick Security Policy\" in the Active Storage guide.\n\n### Affected applications\nAn application is affected if it meets all of these requirements:\n- Uses ImageMagick for Active Storage image processing. This is `config.active_storage.variant_processor = :mini_magick`, which is the default for applications on `load_defaults 6.1` or earlier.\n- Runs ImageMagick under a security policy that does not already deny the coders involved. The policies that Debian and Ubuntu package do not.\n- Allows file uploads from untrusted users.\n\n### Mitigation\n- Upgrade to a fixed version of `activestorage`.\n- An application whose variant processor is `:mini_magick` must use mini_magick `>= 5.1`, which applying the policy requires. With an older mini_magick, such an application raises an exception during boot.\n- An application that renders PostScript or PDF through ImageMagick must re-allow the `gs` delegate and the coders it uses in the host's `policy.xml`.\n- An application that replaces `MiniMagick.cli_env` after boot, clears the environment with `MiniMagick.cli_prefix`, or installs its own `MiniMagick::Shell` does not receive the shipped policy and must carry its rules in ImageMagick's system policy. GraphicsMagick does not read ImageMagick policies.\n- If attachments are stored with the Disk service, change `secret_key_base` and every secret readable by the application process, including the master key and everything `config/credentials.yml.enc` holds, storage and database credentials, and third-party tokens. Do not retain an exposed secret as a fallback.\n\n### Workarounds\nCopy the rules of the policy that the fixed versions ship, `activestorage/lib/active_storage/image_magick/policy.xml`, into ImageMagick's system policy, for example `/etc/ImageMagick-7/policy.xml`. At a minimum, deny the `MSL` coder, the Ghostscript coders, and the `gs` delegate:\n\n```xml\n<policy domain=\"coder\" rights=\"none\" pattern=\"MSL\"/>\n<policy domain=\"delegate\" rights=\"none\" pattern=\"gs\"/>\n<policy domain=\"coder\" rights=\"none\" pattern=\"{PS,PS2,PS3,EPS,EPS2,EPS3,EPI,EPSF,EPSI,EPT,EPT2,EPT3,PDF,AI,EPDF,PDFA,POCKETMOD,XPS,PCL}\"/>\n```\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328\n- 8.0: https://github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776\n\n### Versions affected\n- activestorage < 8.0.5.2\n- activestorage >= 8.1, < 8.1.4.1\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [ryotak](https://hackerone.com/ryotak).\n\n### References\n- ImageMagick [security policy](https://imagemagick.org/security-policy/)\n\n","severity":"critical","url":"https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9","published_at":"2026-11-04T03:09:06Z","updated_at":"2026-11-10T21:07:21Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-x6mj-8jx9-qhqv","cve":"CVE-2026-126077","title":"Possible sensitive session information leak in Active Storage proxy mode","description":"### Impact\nWhen `ActionDispatch::Cookies` reads a signed or encrypted cookie that was written under a rotated secret (`config.action_dispatch.cookies_rotations`) or in the format that a `:hybrid` cookie serializer migrates from, it writes the cookie back to the response in the current format, and that write ignores `request.session_options[:skip]`. `ActiveStorage::DisableSession` relies on that option to keep the session cookie off the public, immutable responses of the Active Storage proxy controllers, but those controllers still load the session, so a request carrying an old-format session cookie could receive the rewritten session cookie in `Set-Cookie` on a cacheable response. A shared cache that stores such a response together with its `Set-Cookie` header could then serve one user's session to later requesters of the same URL, or serve an attacker's session to other users.\n\nApplications are affected when they serve Active Storage files through the proxy controllers, have a cookie rotation or a `:hybrid` serializer migration configured, and run behind a cache that stores `Set-Cookie` on public responses. This is a path around the fix for [CVE-2024-26144](https://github.com/advisories/GHSA-8h22-8cf7-hq6g).\n\n### Details\nIn the fixed releases, a response that skips the session leaves an old-format signed or encrypted cookie unchanged, and the next 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 that the application sets explicitly are still written. See the Action Pack CHANGELOG.\n\n### Workarounds\nConfigure caching proxies not to store responses that carry a `Set-Cookie` header, or complete the cookie rotation or serializer migration and remove it from the configuration.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/849a6c30eacbb6ca4722132f43c4333a93188556.patch\n- 8.0: https://github.com/rails/rails/commit/0e6cf8faa89caf4c64311d35ca2bc88c1458d4e3.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [flashmyname](https://hackerone.com/flashmyname).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-x6mj-8jx9-qhqv","published_at":"2026-11-04T03:02:15Z","updated_at":"2026-11-10T20:58:10Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-wm3x-v3qw-4jh3","cve":"CVE-2026-126081","title":"Possible Strong Parameters bypass in Parameters#each_key in Action Pack","description":"### Impact\n`ActionController::Parameters#each_key` delegates to the internal `ActiveSupport::HashWithIndifferentAccess` that holds the request parameters, so when called with a block it returns that hash instead of the `Parameters` instance. The hash does not respond to `permitted?`, so Active Model mass assignment (`new`, `assign_attributes`, `update`) accepts it without raising `ActiveModel::ForbiddenAttributesError`. An application that passes the return value of `each_key` to mass assignment could allow a remote, unauthenticated attacker to set attributes that the application does not permit, such as an authorization flag.\n\nThis is an incomplete fix of [CVE-2020-8164](https://github.com/advisories/GHSA-8727-m6gj-mc37), which made `each`, `each_pair` and `each_value` return the `Parameters` instance but left `each_key` delegated.\n\n### Details\nThe fixed releases define `Parameters#each_key` to yield each key and return the `Parameters` instance when given a block, as `each`, `each_pair` and `each_value` do, and to return an `Enumerator` without one. Code that used the return value of `each_key` as a hash now receives the `Parameters` instance, which mass assignment rejects unless it is permitted.\n\n### Affected applications\nAn application is affected if it passes the return value of `ActionController::Parameters#each_key`, called with a block, to mass assignment. Rails itself makes no such call.\n\n### Workarounds\nDo not use the return value of `each_key`. Call it for its block only, and pass the permitted `Parameters` instance to mass assignment.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/8ba746e0a786458c281060823f2ccc5c5f6312ac.patch\n- 8.0: https://github.com/rails/rails/commit/2fc8838300133931e19eed3ea6cee76a7e83f19c.patch\n\n### Versions affected\n- actionpack < 8.0.5.2\n- actionpack >= 8.1, < 8.1.4.1\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [smlee](https://hackerone.com/smlee).\n","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-wm3x-v3qw-4jh3","published_at":"2026-11-04T03:02:14Z","updated_at":"2026-11-10T21:05:41Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-v924-7rp8-4mxh","cve":"CVE-2026-126186","title":"Possible arbitrary file read and remote code execution in Active Storage video previews, analysis and image processing","description":"### Impact\r\n`ActiveStorage::Blob#open` writes a blob to a tempfile whose name carries the extension of the uploaded filename, and hands that path to `ffprobe` (`VideoAnalyzer`, `AudioAnalyzer`), `ffmpeg` (`VideoPreviewer`) and ImageMagick (`ImageAnalyzer`, the `:mini_magick` variant processor). These tools select a decoder from the file extension when the content does not identify its own format, so an attacker who chooses the filename and declares the content type of an upload chooses which decoder processes it. An FFmpeg built with AviSynth support treats a file with the `.avs` extension as an AviSynth script and evaluates it, which could disclose files readable by the application process through the preview image, or load a native library the attacker has also uploaded, possibly leading to remote code execution in the FFmpeg process. ImageMagick selects its coders and delegates from the extension in the same way.\r\n\r\n### Details\r\nThe fixed releases keep the uploaded extension on the tempfile only when Marcel maps that extension to the blob's recorded content type, and name the tempfile with no extension otherwise. A form upload whose Rack tempfile fails the same check is copied to a correctly named tempfile before processing. Files whose uploaded extension disagrees with their content type are still processed; the external tool detects their format from the content. The Active Storage CHANGELOG describes the change.\r\n\r\n### Affected applications\r\nAn application is affected if it meets all of these requirements:\r\n- Accepts uploads from untrusted users.\r\n- Analyzes video or audio attachments (which Active Storage does on attach by default), generates video previews, or processes images with ImageMagick.\r\n\r\nThe AviSynth attack additionally requires an FFmpeg built with `--enable-avisynth` and the AviSynthPlus runtime on the host. Upstream FFmpeg and the common Linux distribution and Homebrew packages do not enable it; the GPL builds distributed for Windows and Linux from ffmpeg.org do. Other decoders that FFmpeg or ImageMagick select from the extension may be reachable without AviSynth.\r\n\r\n### Mitigation\r\n- Upgrade to a fixed version of `activestorage`.\r\n\r\n### Expire and change secrets\r\nUpgrading closes the vulnerability but does not undo a disclosure that already occurred. An application that meets the AviSynth requirement above should treat every secret readable by the application process as potentially exposed and change it, including `secret_key_base`, the master key and everything in `config/credentials.yml.enc` that it decrypts, the Active Storage service credentials, database credentials, and tokens for third-party services. Changing `secret_key_base` expires active sessions and invalidates signed and encrypted cookies, signed global IDs and Active Storage URLs. Do not retain an exposed secret as a fallback.\r\n\r\n### Workarounds\r\nApplications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing `ActiveStorage::Previewer::VideoPreviewer` from `config.active_storage.previewers`, and `ActiveStorage::Analyzer::VideoAnalyzer` and `ActiveStorage::Analyzer::AudioAnalyzer` from `config.active_storage.analyzers`. Running an FFmpeg built without AviSynth support closes the AviSynth attack but not the extension-selected decoders of ImageMagick.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\nPatches for those who cannot upgrade at once:\r\n- 8.1: https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e.patch\r\n- 8.0: https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636.patch\r\n\r\n### Versions affected\r\n- activestorage < 8.0.5.2\r\n- activestorage >= 8.1, < 8.1.4.1\r\n\r\n### Credit\r\nThis issue was responsibly reported by HackerOne researcher [pirikara](https://hackerone.com/pirikara).\r\n","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-v924-7rp8-4mxh","published_at":"2026-11-04T03:02:13Z","updated_at":"2026-11-10T21:13:37Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-v6rj-xm57-3p59","cve":"CVE-2026-126078","title":"Possible XSS vulnerability in Action View highlight helper","description":"### Impact\n`ActionView::Helpers::TextHelper#highlight` substitutes each matched phrase into the `:highlighter` string without escaping it and returns the result marked HTML-safe. Because sanitizing leaves quote characters in text unescaped, a match substituted into a quoted attribute value of the highlighter, such as the `<a href=\"search?q=\\1\">` form shown in the method's documentation, could end the attribute value and add attributes to the element, possibly leading to XSS. Applications are affected when they pass a `:highlighter` that places a placeholder inside an attribute value and highlight text or phrases that a user controls. The default `<mark>\\1</mark>` highlighter and the block form are not affected.\n\n### Details\nThe fixed releases HTML-escape each group substituted into the `:highlighter` string, so quotes in a match are rendered as `&quot;` and `&#39;`. Only the numbered placeholders `\\0` to `\\9` are expanded; other `String#sub` replacement escapes, such as `\\k<name>`, `\\&` and `\\\\`, are left as written. A match can no longer begin on the `>` that closes a preceding tag. Escaping makes a placeholder safe as element content or inside a quoted attribute value, but not in an unquoted attribute value, a URL, JavaScript or CSS context, or an attribute whose value is HTML. See the Action View CHANGELOG for details.\n\n### Workarounds\nUse a `:highlighter` that places the matched phrase only in element content, such as the default `<mark>\\1</mark>`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/06938194b4fd59e1d2c8ab4a781f3c1e2b763425.patch\n- 8.0: https://github.com/rails/rails/commit/c796f6198837479ada13290eb8fa767b5219a58a.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-THHUJQVO).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-v6rj-xm57-3p59","published_at":"2026-11-04T03:02:12Z","updated_at":"2026-11-10T21:00:01Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionview","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-rwvh-fw6r-pwvp","cve":"CVE-2026-126072","title":"Possible DoS vulnerability in Action Controller Live streaming","description":"### Impact\n`ActionController::Live::Buffer#close` pushes its end-of-stream marker onto the response's bounded queue while it holds the buffer's monitor. When the client has stopped reading and the queue is full, the push blocks, and `Buffer#abort`, which runs when the client disconnects or a write times out, waits indefinitely for the same monitor. Each such response could permanently hold a web server thread and its `ActionController::Live` thread, possibly resulting in a DoS vulnerability through thread exhaustion.\n\nApplications that stream responses with `ActionController::Live`, including `send_stream`, are affected. Applications that serve large files through Active Storage proxy mode are exposed to unauthenticated clients.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/ccbfc09690fef05fdd2a9969c917a71b92cc98fc.patch\n- 8.0: https://github.com/rails/rails/commit/27ad18ed5900dee28ba20e9c6fc718ff751fa215.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-LDFW5N2T).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-rwvh-fw6r-pwvp","published_at":"2026-11-04T03:02:11Z","updated_at":"2026-11-10T20:44:09Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-rq8q-p985-fjq7","cve":"CVE-2026-126070","title":"Possible XSS vulnerability in Action View strip_tags","description":"### Impact\n`strip_tags` in Action View returns its sanitized output marked `html_safe`, but the underlying sanitizer encodes only `&`, `<` and `>`, leaving `\"` and `'` unencoded. Because ERB does not escape a string marked `html_safe`, untrusted input passed through `strip_tags` and rendered inside a quoted HTML attribute value could close the attribute and add new attributes, possibly leading to XSS. Applications that render `strip_tags` output from untrusted input inside an HTML attribute, for example in a `title` attribute or a `<meta content>` tag, are affected. Output rendered as element content is not affected.\n\n### Details\n`strip_tags` now encodes `\"` and `'` in its output, as well as `&`, `<` and `>`, without double-encoding existing entities. Applications that use `strip_tags` output outside HTML, such as in a text template or JSON, now see `&quot;` and `&#39;` where they saw `\"` and `'`; `CGI.unescapeHTML` decodes them. See the Action View CHANGELOG.\n\n### Workarounds\nPass `strip_tags` output to an attribute through a tag helper, which escapes attribute values, for example `tag.a(title: strip_tags(user_input))`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/568b19cb860322885593e308a7f27aceb779e9d7.patch\n- 8.0: https://github.com/rails/rails/commit/c3772a10f405f9644125cbb484adfd2aa7a25a59.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [lucasluitjes](https://hackerone.com/lucasluitjes).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-rq8q-p985-fjq7","published_at":"2026-11-04T03:02:09Z","updated_at":"2026-11-10T20:37:55Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionview","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-r9jg-fmfx-2gv6","cve":"CVE-2026-126073","title":"Possible cache poisoning in Action Pack content negotiation","description":"### Impact\nAction Pack negotiates the format of a rendered response from the `Accept`, `X-Requested-With` and, for XHR requests without `Accept`, `Content-Type` request headers, but `ActionController::Rendering#_set_vary_header` adds `Vary: Accept` only when the request carries a usable `Accept` header and the response has no `Vary` header yet. A response to a request without `Accept`, or to an XHR request, therefore omits the headers that selected its representation, and a response whose `Vary` the application set before rendering (for example `Vary: Accept-Language`) never gains `Accept`. A shared cache that honours `Vary` could store such a response and serve it to later clients that request a different representation, possibly leading to cache poisoning in which visitors receive, until the entry expires, a page without its layout or HTML in place of JSON. The attacker cannot choose the content of the response.\n\nApplications that render negotiated responses from actions marked `public` (for example with `expires_in ..., public: true`) behind a shared cache that honours `Vary`, such as Thruster or `Rack::Cache`, are affected.\n\n### Details\nIn the fixed releases, a rendered response whose format is not given by the URL lists `Accept` and `X-Requested-With` in `Vary`, and also `Content-Type` for an XHR request without `Accept`; when `config.action_dispatch.ignore_accept_header` is enabled, it lists only `X-Requested-With`. These fields are appended to an existing `Vary` value rather than skipped, and `Vary: *` is left unchanged. Shared caches can store more variants of such responses than before. See the Action Pack CHANGELOG for details.\n\n### Workarounds\nSet `Vary: Accept, X-Requested-With` on negotiated responses in the application, for example in an `after_action`, or do not mark negotiated responses `public`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/7a955ca36779938267c93902c47d1f55bab99b4b.patch\n- 8.0: https://github.com/rails/rails/commit/b58c107abe9c1f10c1d6a4941402c60e4dc4742c.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-7GHGLQGO, ANT-2026-5MT6C2R3).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-r9jg-fmfx-2gv6","published_at":"2026-11-04T03:02:08Z","updated_at":"2026-11-10T20:45:54Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-p2pm-g2h6-7j5j","cve":"CVE-2026-126074","title":"Possible DoS vulnerability in Active Storage filename handling","description":"### Impact\n`ActiveStorage::Filename#base` and `#extension_with_delimiter`, and therefore `#extension`, pass the stored filename unmodified to `File.basename` and `File.extname`, which raise `ArgumentError` when the name contains a NUL byte. Active Storage stores the client-supplied filename verbatim, so a user who is permitted to upload an attachment could persist such a filename on databases that accept NUL bytes in string columns, such as SQLite and MySQL/MariaDB. Each subsequent request that builds a variant or preview of the blob, opens it, or renders it as an Action Text attachment then raises, possibly resulting in a persistent DoS vulnerability for the pages that display the blob until it is purged or its filename is corrected. Applications that use PostgreSQL are not affected, because PostgreSQL rejects the row.\n\n### Details\n`Filename#base` and `#extension_with_delimiter` now derive from `Filename#sanitized`, the form that `Filename#to_s` and the `Content-Disposition` header already use. For a filename that `#sanitized` changes, such as one containing a NUL byte, an invalid byte sequence, a path separator or another replaced character, the base and extension now agree with `#to_s`; the variant format inferred from such a name may change, and an existing variant may be regenerated once. Stored filenames are not modified, and no data migration is required.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/60f22af88b71eae251f112d8c0237a08a8832692.patch\n- 8.0: https://github.com/rails/rails/commit/9b0d4bef2211a2c08cab2e0ea17fa1d0efd5d47a.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-UQM5Z4YL).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-p2pm-g2h6-7j5j","published_at":"2026-11-04T03:02:07Z","updated_at":"2026-11-10T20:47:39Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-hfr4-8rjc-97m2","cve":"CVE-2026-126085","title":"Possible circumvention of file size limits in Active Storage direct uploads to Google Cloud Storage","description":"### Impact\n`ActiveStorage::Service::GCSService#url_for_direct_upload` does not bind the declared content length into the signed direct-upload URL, and `#headers_for_direct_upload` returns no length constraint, so the URL authorizes an upload body of any size. A direct-upload client could store a file larger than the `byte_size` it declared, and the resulting blob keeps the declared size, possibly bypassing application file size validations and quotas. This is the weakness that CVE-2020-8162 fixed in the S3 service.\n\nApplications that store files in Google Cloud Storage and accept direct uploads are affected.\n\n### Details\nThe fixed releases sign an `x-goog-content-length-range` header that matches the blob's declared `byte_size` and return it from `headers_for_direct_upload`, so Cloud Storage rejects an upload body of any other size. Browsers send this header with the direct upload, so a bucket's CORS configuration must list `x-goog-content-length-range` in `responseHeader`, or browser direct uploads fail after the upgrade. The Active Storage CHANGELOG and the CORS example in the Active Storage guide show the change.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/e19916cea31cbfb0030b165ae853b741f8dd57a7.patch\n- 8.0: https://github.com/rails/rails/commit/7fe85a72a789eae5ee070ce3ee1dad10a8a5f70c.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [f4cts](https://hackerone.com/f4cts).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-hfr4-8rjc-97m2","published_at":"2026-11-04T03:02:06Z","updated_at":"2026-11-10T21:12:03Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-gmj8-hvj3-49mw","cve":"CVE-2026-126067","title":"Missing SameSite attribute on session cookies from Action Pack session stores","description":"### Impact\nAction Pack session stores other than `ActionDispatch::Session::CookieStore` (`CacheStore`, `MemCacheStore`, and third-party stores built on `AbstractStore`, `AbstractSecureStore` or the session mixins) write the session cookie without a `SameSite` attribute, regardless of `config.action_dispatch.cookies_same_site_protection`, which defaults to `:lax`. Only `CookieStore` applies the configured policy. In browsers that do not treat a cookie without the attribute as `SameSite=Lax`, a cross-site request could carry the session cookie, possibly leading to cross-site request forgery against actions that do not verify an authenticity token, such as those of API-only applications.\n\nApplications are affected when they use a session store other than `CookieStore` and do not pass `same_site:` to `config.session_store`.\n\n### Details\nIn the fixed releases, every session store sets the session cookie's `SameSite` attribute from `cookies_same_site_protection` when its options have no `:same_site` key. An explicit `same_site:` option, including `same_site: nil`, and a `:same_site` value in a store's `DEFAULT_OPTIONS` still take precedence.\n\n### Workarounds\nPass `same_site:` when configuring the session store, for example `config.session_store :cache_store, same_site: :lax`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/2d9f502df941e31ce9bad0e846564f49396bed46.patch\n- 8.0: https://github.com/rails/rails/commit/f2392996be723708271a8d30bfcf0edc221e53ef.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [tjvc](https://hackerone.com/tjvc).\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-gmj8-hvj3-49mw","published_at":"2026-11-04T03:02:05Z","updated_at":"2026-11-10T20:24:22Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-8474-xrp6-wh69","cve":"CVE-2026-126080","title":"Possible DoS vulnerability in Active Support safe_constantize","description":"### Impact\nWhen 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.\n\nAction 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.\n\n### Details\nThe 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.\n\n### Affected applications\nAn application is affected if it meets all of these requirements:\n- 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`.\n- Accepts Action Cable connections from untrusted clients. `ApplicationCable::Connection#connect` authenticates nobody unless the application adds a check.\n\n### Workarounds\nApplications 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.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/95aa9e416016524956d4904fed96eaed079580bb.patch\n- 8.0: https://github.com/rails/rails/commit/210ac22d446c8e2625b091e79256806b836eee20.patch\n\n### Versions affected\n\n- activesupport < 8.0.5.2\n- activesupport >= 8.1, < 8.1.4.1\n\n### Credit\nThis issue was responsibly reported by Felix Tscheulin ([flixt](https://hackerone.com/flixt)) through HackerOne researcher [scheja](https://hackerone.com/scheja), and independently by Bucky Wolfe ([Igneous](https://github.com/Igneous)), who provided a proof of concept that crashes the server. It was also found by the Anthropic OSS Scanner (ANT-2026-ZUN5KU3Q).\n","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-8474-xrp6-wh69","published_at":"2026-11-04T03:02:04Z","updated_at":"2026-11-10T21:03:50Z","withdrawn_at":null,"packages":[{"name":"activesupport","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activesupport","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-68p9-83h6-5wpj","cve":"CVE-2026-126069","title":"Possible XSS vulnerability in Action View tag helpers","description":"### Impact\nThe fix for [CVE-2026-33168](https://github.com/rails/rails/security/advisories/GHSA-v55j-83pf-r9cq) skips blank HTML attribute names in Action View tag helpers, but it tests the name before converting it to a string. A Symbol name made only of whitespace, such as `:\" \"`, is not blank, because `Symbol#blank?` is `Symbol#empty?`, so it reaches the attribute escaping, which emits an attribute with no name and produces malformed HTML. The asset tag helpers, such as `image_tag`, `video_tag` and `audio_tag`, symbolize their options, so a whitespace String name passed to them takes the same path. A carefully crafted attribute value could then be misinterpreted by the browser as a separate attribute name, possibly leading to XSS. Applications that allow users to specify custom HTML attribute names are affected.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/9190210606ffe52f92fdc75637f8ff69404f22c8.patch\n- 8.0: https://github.com/rails/rails/commit/f47452533e1f28d847c63181b9d5f8b7243ef9a4.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [thepo1es](https://hackerone.com/thepo1es).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-68p9-83h6-5wpj","published_at":"2026-11-04T03:02:03Z","updated_at":"2026-11-10T20:35:12Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionview","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-5957-c7qm-m469","cve":"CVE-2026-126068","title":"Possible signature replay in Action Mailbox Mailgun ingress","description":"### Impact\nThe Action Mailbox Mailgun ingress authenticates a request with an HMAC of the `timestamp` and `token` parameters concatenated without a separator, and `ActionMailbox::Ingresses::Mailgun::InboundEmailsController::Authenticator#recent?` rejects only timestamps more than 2 minutes in the past. Because the signature does not fix the boundary between the two values, a captured signed request can be presented with a timestamp far in the future, which the ingress then accepts indefinitely. An attacker who obtains one signed Mailgun webhook request, but not the signing key, could submit arbitrary inbound email that Action Mailbox processes as genuine, possibly leading to forged messages attributed to the sender of the attacker's choosing.\n\nApplications that receive inbound email through the Action Mailbox Mailgun ingress are affected.\n\n### Details\nThe fixed releases also reject a Mailgun request whose timestamp is more than 2 minutes ahead of the server's clock, as they already did for one more than 2 minutes behind it. An application whose clock runs more than 2 minutes behind Mailgun's will now reject genuine webhooks and should synchronize its clock.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/c3a295c5c22266e8ec4d0e664e6923a299235e7a.patch\n- 8.0: https://github.com/rails/rails/commit/4aa2ec66822bc4eb8b341a0608f1c90a3e371a34.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [davutselcuk](https://hackerone.com/davutselcuk).\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-5957-c7qm-m469","published_at":"2026-11-04T03:02:01Z","updated_at":"2026-11-10T20:31:29Z","withdrawn_at":null,"packages":[{"name":"actionmailbox","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionmailbox","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-4v2w-w6g6-f8f8","cve":"CVE-2026-126071","title":"Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming","description":"### Impact\nWhen Active Storage serves a file through its proxy controllers, `ActiveStorage::Streaming#send_blob_stream` handles an error from the storage service by calling `head` to send a 404 or 500 response. If the error occurs after the first chunk has been written, the response is already committed, and `head` replaces the response body while the server is still reading the original `ActionController::Live` buffer. That buffer is never closed, so the server thread handling the request blocks until the process restarts. Repeated failed downloads could exhaust the server's threads, possibly resulting in a DoS vulnerability.\n\nApplications are affected when they store files on a service that streams a download in several requests, such as Amazon S3, an S3-compatible service or Google Cloud Storage, and draw Active Storage's default routes. The proxy routes are drawn whether or not proxy mode is the default for the application. A file deleted while it is being served, or any other storage error partway through a download, triggers the condition.\n\n### Details\nA storage error raised before the response is committed still produces a 404 or 500 response. After the fix, a storage error raised after the response is committed is re-raised instead, so the server closes the streamed response and releases the thread; the client receives a truncated body, and the exception reaches the application's error reporting.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/3c67a693fb21870ecb1222e3da59d5c491a62009.patch\n- 8.0: https://github.com/rails/rails/commit/655b4442de136a3701334607f634d698bf9d5b82.patch\n\n### Credit\nThis issue was found by the Anthropic OSS Scanner (ANT-2026-FMPUMYTB).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-4v2w-w6g6-f8f8","published_at":"2026-11-04T03:02:00Z","updated_at":"2026-11-10T20:39:46Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-3w93-6hmw-whh4","cve":"CVE-2026-126084","title":"Unsigned Content-Type in Active Storage GCS direct uploads with cache_control","description":"### Impact\nWhen a GCS service is configured with the `cache_control` option, `ActiveStorage::Service::GCSService#url_for_direct_upload` signs direct-upload URLs with V4, and the V4 signature covers only the `Cache-Control` and `Host` headers. A direct-upload client can therefore send a `Content-Type` of its choosing, and can omit the declared `Content-MD5`, without invalidating the URL. GCS stores the supplied content type as object metadata, which takes precedence over the `response-content-type` that Active Storage sets on download URLs, so an uploaded object could be served as inline HTML under the application's bucket path on `storage.googleapis.com`. Script in such an object runs on the storage origin rather than the application's, but could register a Service Worker scoped to the bucket path and read or replace a victim's later responses for signed URLs in that bucket.\n\nApplications that use the GCS service with `cache_control` configured and accept direct uploads are affected. GCS services without `cache_control` sign with V2 and are not affected.\n\n### Details\nThe fixed releases sign every GCS direct-upload URL with V2, which binds an empty `Content-Type` and the declared `Content-MD5`. The configured `Cache-Control` is still returned by `headers_for_direct_upload` and sent by the client, but it is no longer part of the signature, and direct-upload URLs for these services are no longer limited to V4's seven-day maximum expiry. See the Active Storage CHANGELOG.\n\n### Workarounds\nRemoving the `cache_control` option from the GCS service configuration makes Active Storage sign direct uploads with V2.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/8d93f6a872e9550a91bf0e4fce50083a235ef3b1.patch\n- 8.0: https://github.com/rails/rails/commit/ddc08ba61a8001e7402864c62e466cf732fc7614.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [thepo1es](https://hackerone.com/thepo1es).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-3w93-6hmw-whh4","published_at":"2026-11-04T03:01:59Z","updated_at":"2026-11-10T21:10:18Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-3f4q-8x5m-76v8","cve":"CVE-2026-126188","title":"Possible local file disclosure in Active Storage video previews and analysis","description":"### Impact\nActive Storage's `VideoPreviewer`, `VideoAnalyzer` and `AudioAnalyzer` run `ffmpeg` and `ffprobe` on a blob's contents without restricting the input format, so FFmpeg selects a demuxer by probing the file. A blob created through a direct upload keeps the content type the client declared, so a client can store an HLS playlist under a `video/*` or `audio/*` type. When that blob is previewed or analyzed, the `hls` demuxer opens the `file://` segments that the playlist names, and the preview image or the stored metadata could disclose a local media file that the application process can read and whose path the attacker knows.\n\nApplications that accept uploads from untrusted users and generate video previews, or analyze video or audio attachments with FFmpeg, are affected.\n\n### Details\nThe fixed releases limit the formats FFmpeg may open to common audio and video containers, configured by the new `config.active_storage.ffmpeg_allowed_formats` setting. Files in other formats no longer preview or receive media metadata; the Active Storage CHANGELOG names some of them and shows how to add a format to the list.\n\n### Workarounds\nApplications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing `ActiveStorage::Previewer::VideoPreviewer` from `config.active_storage.previewers`, and `ActiveStorage::Analyzer::VideoAnalyzer` and `ActiveStorage::Analyzer::AudioAnalyzer` from `config.active_storage.analyzers`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/3b1f2627538dc597cd973530c08514a26c2b0282.patch\n- 8.0: https://github.com/rails/rails/commit/69aff80d115bbb9d1e82fd6c6f2fd3ddeafb958b.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [w3rmut](https://hackerone.com/w3rmut).\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-3f4q-8x5m-76v8","published_at":"2026-11-04T03:01:58Z","updated_at":"2026-11-10T23:39:54Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"activestorage","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-2w9f-fxwj-w2qf","cve":"CVE-2026-126075","title":"Possible XSS vulnerability in Active Support MessagePack serializer","description":"### Impact\n`ActiveSupport::MessagePack` serializes an `ActiveSupport::SafeBuffer` as its bytes alone and deserializes it as a new `SafeBuffer`, so a buffer that is no longer `html_safe?` (for example, one mutated in place with `gsub!`) is restored as `html_safe`. If such a buffer holds untrusted input and is stored through a MessagePack serializer, rendering it after it is loaded bypasses ERB auto-escaping, possibly leading to XSS.\n\nApplications on Rails 8.1 are affected if they use a MessagePack serializer, such as `config.action_dispatch.cookies_serializer = :message_pack` or `:message_pack_allow_marshal`, or `serializer: :message_pack` for `Rails.cache`, `ActiveSupport::MessageVerifier` or `ActiveSupport::MessageEncryptor`, and store a `SafeBuffer` that was mutated in place with untrusted input. Rails 8.0 and earlier do not serialize `SafeBuffer` with MessagePack and are not affected.\n\n### Details\nThe fixed releases serialize a `SafeBuffer` that is not `html_safe?` with a marker and deserialize it as a `String`; a `SafeBuffer` that is `html_safe?` keeps the existing format. Versions without the fix cannot read an unsafe buffer serialized by the fixed releases, so during a rolling deploy a cookie or cache entry holding one could fail to load on a process that has not been upgraded.\n\n### Workarounds\nApplications that cannot upgrade can convert a `SafeBuffer` to a `String` with `to_str` before storing it in a value that a MessagePack serializer writes.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/4ca090665976e6fbc471c38689b399f84b43cdc7.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [jcwilk](https://hackerone.com/jcwilk).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-2w9f-fxwj-w2qf","published_at":"2026-11-04T03:01:57Z","updated_at":"2026-11-10T20:50:38Z","withdrawn_at":null,"packages":[{"name":"activesupport","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"}]},{"id":"GHSA-2p2f-4rq4-gjwc","cve":"CVE-2026-126079","title":"Possible XSS vulnerability in Action View text helpers","description":"### Impact\nWith the HTML5 sanitizer (`Rails::HTML5::Sanitizer`, the default vendor on CRuby for applications using `load_defaults 7.1` or later), Nokogiri before 1.19.5 serializes `<` and `>` unescaped inside attribute values. The Action View text helpers `highlight` and `simple_format` sanitize their input and then process the resulting HTML as a string: `highlight` splits it on tag boundaries to insert matches, and `simple_format` splits it into paragraphs on blank lines. An unescaped `>` or a blank line inside an attribute value could cause markup in that value, which the sanitizer left inert, to be emitted as live elements in the helper's `html_safe` output, possibly leading to XSS. Applications that use the HTML5 sanitizer and pass untrusted text to `highlight`, or to `simple_format` with `html_options`, are affected.\n\n### Details\nThe fixed releases require rails-html-sanitizer 1.7.2 or later, which requires Loofah 2.25.3 and Nokogiri 1.19.5. With these versions, the HTML5 sanitizer escapes `<` and `>` in attribute values as `&lt;` and `&gt;`, as the HTML4 sanitizer already does. The parsed DOM is unchanged, but code or tests that compare sanitized HTML as a string may see the new serialization.\n\n### Workarounds\nUpgrade Nokogiri to 1.19.5 or later; the escaping is in its HTML5 serializer, so no Rails upgrade is needed. Alternatively, use the HTML4 sanitizer by setting `config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer`.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/adc3a32d4abea77ed3aacf6f5fb71cfc005bef73.patch\n- 8.0: https://github.com/rails/rails/commit/009ea68342d05d02087c04dae7faaa4e4c1def11.patch\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [azaran](https://hackerone.com/azaran).\nThis issue was also found by the Anthropic OSS Scanner (ANT-2026-RTK47OH0).\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-2p2f-4rq4-gjwc","published_at":"2026-11-04T03:01:56Z","updated_at":"2026-11-10T21:01:40Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionview","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-2gff-2mmg-m73p","cve":"CVE-2026-126083","title":"Possible IP spoofing in Action Dispatch RemoteIp","description":"### Impact\nSince Rails 8.1.0, `ActionDispatch::RemoteIp` derives `request.remote_ip` from `Rack::Request#forwarded_for`, which under Rack 3 reads the RFC 7239 `Forwarded` header in preference to `X-Forwarded-For`. When a reverse proxy appends the client address to `X-Forwarded-For` but passes a client-supplied `Forwarded` header through unchanged, `request.remote_ip` returns an address chosen by the client, and the IP spoofing check does not raise, because it compares only `Client-Ip` with the forwarded addresses. An unauthenticated attacker could therefore spoof `request.remote_ip`, possibly bypassing IP-based access controls and rate limits keyed on the client address (including the default `by:` of `rate_limit`), and falsifying the client address in logs.\n\n### Details\nThe 8.1.0 change ([2d084af8](https://github.com/rails/rails/commit/2d084af8444a7b6b868c7cbb256172007871e78d)) switched `ActionDispatch::RemoteIp` from reading `X-Forwarded-For` directly to Rack's `forwarded_for`, in order to reuse Rack's port handling. Rails continues to honor `Forwarded`, the standard header.\n\nIn the fixed releases, when `config.action_dispatch.ip_spoofing_check` is enabled (the default), `ActionDispatch::RemoteIp` also compares the first untrusted client address in `Forwarded` with the first untrusted client address in `X-Forwarded-For`, as exact strings, and raises `ActionDispatch::RemoteIp::IpSpoofAttackError` when both headers are present and the addresses differ. Deployments whose proxies report the client address inconsistently between the two headers will receive this error after upgrading. See the `actionpack` CHANGELOG.\n\n### Affected applications\nAn application is affected if it meets all of these requirements:\n- Runs Rails 8.1.0 through 8.1.4 with Rack 3. Under Rack 2.2, `forwarded_for` reads only `X-Forwarded-For`.\n- Is served behind a proxy that does not remove or overwrite a client-supplied `Forwarded` header.\n- Relies on `request.remote_ip` for access control, rate limiting, or auditing.\n\nThe fix detects a spoofed `Forwarded` header only when the proxy also sets `X-Forwarded-For`. An application whose proxy passes a client-supplied `Forwarded` header through and sets no `X-Forwarded-For` remains exposed after upgrading, and should configure the proxy to remove or overwrite `Forwarded`, or apply the workaround below.\n\n### Mitigation\n- Upgrade to a fixed version of `actionpack`.\n- Configure reverse proxies to remove or overwrite any client-supplied `Forwarded` header.\n\n### Workarounds\nApplications whose proxies set `X-Forwarded-For` can make Rack ignore the `Forwarded` header, restoring the client address resolution of Rails 8.0, by setting `Rack::Request.forwarded_priority = [:x_forwarded]` in an initializer. This setting is available in Rack 3.0.0 and later, and it also causes Rack to ignore `Forwarded` when determining the request scheme, host, and port.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/2a01a5ac521184419d9a92fa2c25e102e68cd227.patch\n\n### Versions affected\n- actionpack >= 8.1, < 8.1.4.1\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [luryus](https://hackerone.com/luryus).\n","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-2gff-2mmg-m73p","published_at":"2026-11-04T03:01:54Z","updated_at":"2026-11-10T21:08:58Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"}]},{"id":"GHSA-2586-8ghr-69fj","cve":"CVE-2026-126076","title":"Possible restoration of destroyed sessions in Action Dispatch CacheStore","description":"### Impact\n`ActionDispatch::Session::CacheStore` writes a session back to the cache at the end of each request that loaded it, without checking that the session's cache entry still exists. When a concurrent request destroys the session, through `reset_session` on logout or by deleting its cache entry on the server, a request that loaded the session earlier and finishes later restores it under its original session ID. Logout and server-side revocation could therefore fail to end a session, and an attacker who holds a stolen session cookie could keep that session valid across the victim's logout.\n\nApplications that use `config.session_store :cache_store` are affected, with any cache backend. `ActionDispatch::Session::CookieStore` is not affected, nor is `ActionDispatch::Session::MemCacheStore` with Dalli 4.0.0 or later, whose session store does not write back a session that was deleted.\n\n### Details\nThe fixed releases record which session a request loaded and skip the write when that session's cache entry no longer exists. Changes that such a request makes to the destroyed session are discarded, and Rack logs a warning that the session could not be saved. Each request that writes back a session it loaded makes one additional cache read.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/d479192cf88a8b30a335a8bc25188a2d8e0f8d9f.patch\n- 8.0: https://github.com/rails/rails/commit/5bb5ec66ed8faaf590ffe1222d7a5eb6e9d050f5.patch\n\n### Credit\nFound by the team during internal code review.\n","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-2586-8ghr-69fj","published_at":"2026-11-04T03:01:46Z","updated_at":"2026-11-10T20:56:09Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.4.1","patched":"8.1.4.1"},{"name":"actionpack","affected":"< 8.0.5.2","patched":"8.0.5.2"}]},{"id":"GHSA-xr9x-r78c-5hrm","cve":"CVE-2026-66066","title":"Possible arbitrary file read and remote code execution in Active Storage variant processing","description":"### Impact\r\nIn its default configuration, a Rails application that displays image variants may allow an\r\nunauthenticated attacker to read arbitrary files from the server, including the process environment.\r\nThat environment typically holds `secret_key_base` and often credentials for external systems, which\r\nmay in turn allow escalation to remote code execution or lateral movement to those systems.\r\n\r\n### Details\r\nlibvips reads and writes file formats through \"loaders\" and \"savers\" (or more generally\r\n\"operations\"), many of which are backed by third-party libraries. It marks some of these operations\r\nas \"unfuzzed\", meaning they are unsafe for untrusted content, and several handle formats unrelated\r\nto web images. Active Storage did not disable the unfuzzed operations, so an attacker who can upload\r\na crafted file and cause a variant to be generated from it may be able to invoke one.\r\n\r\nWe are aware of a mechanism by which an attacker, by uploading a crafted file, is able to cause\r\ndisclosure of the contents of arbitrary files accessible on the filesystem of the targeted\r\napplication. One specific attack chain has been reported to us (see \"Disclosure\" below), but we do\r\nnot assume it is the only one that exists.\r\n\r\n### Affected applications\r\nAn application is affected if it meets all of these requirements:\r\n- Uses libvips for Active Storage image processing. This is `config.active_storage.variant_processor = :vips`,\r\n  which `load_defaults 7.0` set and no later default has changed.\r\n- Allows image uploads from untrusted users.\r\n\r\nGenerating variants is not a separate requirement.\r\n\r\n### Mitigation\r\n- Upgrade to a fixed version of `activestorage`.\r\n- The minimum version of libvips must be upgraded to `>= 8.13`.\r\n- Change `secret_key_base` and change any secrets accessible in the application environment (see \"Expire and change secrets\" below)\r\n\r\nEarlier versions of libvips (`< 8.13`) cannot disable unfuzzed operations at all, and Active Storage\r\nwill raise an exception during boot in such an unsecurable environment.\r\n\r\n### Expire and change secrets\r\n\r\nUpgrading closes the vulnerability but does not undo an exfiltrated secret if that already\r\noccurred. An affected application should treat every secret readable by the application process as\r\npotentially exposed and change it, including:\r\n\r\n- `secret_key_base`\r\n- The master key, whether stored in `config/master.key` or supplied as `RAILS_MASTER_KEY`, along\r\n  with everything in `config/credentials.yml.enc` that it decrypts\r\n- Credentials for the Active Storage service, such as S3, GCS, or Azure keys\r\n- Database credentials\r\n- Tokens and keys for any third-party service the application calls\r\n\r\nChanging `secret_key_base` expires active sessions and requires users to log in again. Encrypted\r\ncookies, signed cookies, signed global IDs, and Active Storage URLs are also affected.\r\n\r\nRotation should only be used as an intermediate step if necessary. Do not retain an exposed secret\r\nas a fallback.\r\n\r\n### Workarounds\r\nIf libvips `< 8.13` is being used, there are no workarounds available other than removing the\r\ndependency on libvips from the application. Some applications may have `ruby-vips` declared as a\r\ndependency only for image analysis, and those applications may be able to simply remove `ruby-vips`\r\nfrom the Gemfile to remove libvips from the application. Applications that do not use Active Storage\r\ncan remove `ruby-vips` from the Gemfile to avoid the boot-time checks.\r\n\r\nIf libvips `>= 8.13` is present on the system, applications can disable the unfuzzed operations\r\nwithout upgrading Rails by setting the `VIPS_BLOCK_UNTRUSTED` environment variable, which libvips\r\nreads while initializing.\r\n\r\nApplications also running ruby-vips `>= 2.2.1` or later can instead call\r\n`Vips.block_untrusted(true)` from an initializer.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Versions affected\r\n\r\n- activestorage < 7.2.3.2\r\n- activestorage >= 8.0, < 8.0.5.1\r\n- activestorage >= 8.1, < 8.1.3.1\r\n\r\n### Disclosure\r\nTechnical details of the attack chain are intentionally omitted from this advisory. They would add\r\nnothing to an administrator's decision to upgrade, while making it substantially easier to attack\r\napplications that have not yet done so.\r\n\r\nDetails will be disclosed no later than 2026-08-28, via the [Rails Security\r\nAnnouncements](https://discuss.rubyonrails.org/c/security-announcements/9) forum.\r\n\r\n### Credit\r\nThis issue was responsibly reported by [0xacb](https://x.com/0xacb), [s3np41k1r1t0](https://x.com/s3np41k1r1t0) and [castilho](https://x.com/castilho101) from [Ethiack](https://ethiack.com), and [RyotaK](https://ryotak.net) from [GMO Flatt Security Inc.](https://flatt.tech/en/).\r\n\r\n### References\r\n- libvips 8.13 release notes, [blocking of unfuzzed loaders](https://www.libvips.org/2022/05/28/What's-new-in-8.13.html#blocking-of-unfuzzed-loaders)\r\n- W.A. Arbaugh, W.L. Fithen, and J. McHugh, [\"Windows of Vulnerability: A Case Study\r\n  Analysis\"](https://doi.org/10.1109/2.889093), IEEE Computer 33(12), December 2000\r\n- https://ethiack.com/info-hub/research/kindarails2shell-rails-rce-cve\r\n- https://blog.flatt.tech/entry/kindarails2shell_rails\r\n","severity":"critical","url":"https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm","published_at":"2026-07-29T15:09:37Z","updated_at":"2026-07-29T15:09:37Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":"< 7.2.3.2","patched":"7.2.3.2"},{"name":"activestorage","affected":">= 8.0, < 8.0.5.1","patched":"8.0.5.1"},{"name":"activestorage","affected":">= 8.1, < 8.1.3.1","patched":"8.1.3.1"}]},{"id":"GHSA-pgm4-439c-5jp6","cve":"CVE-2026-33167","title":"Possible XSS vulnerability in Action Pack debug exceptions","description":"### Impact\r\nThe debug exceptions page does not properly escape exception messages. A carefully crafted exception message could inject arbitrary HTML and JavaScript into the page, leading to XSS. This affects applications with detailed exception pages enabled (`config.consider_all_requests_local = true`), which is the default in development.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [fbettag](https://hackerone.com/fbettag).","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-pgm4-439c-5jp6","published_at":"2026-03-23T20:04:36Z","updated_at":"2026-04-21T19:23:29Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"}]},{"id":"GHSA-v55j-83pf-r9cq","cve":"CVE-2026-33168","title":"Possible XSS vulnerability in Action View tag helpers","description":"### Impact\r\nWhen a blank string is used as an HTML attribute name in Action View tag helpers, the attribute escaping is bypassed, producing malformed HTML. A carefully crafted attribute value could then be misinterpreted by the browser as a separate attribute name, possibly leading to XSS. Applications that allow users to specify custom HTML attributes are affected.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [taise](https://hackerone.com/taise).","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-v55j-83pf-r9cq","published_at":"2026-03-23T20:04:25Z","updated_at":"2026-04-21T19:26:16Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"actionview","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"actionview","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-89vf-4333-qx8v","cve":"CVE-2026-33170","title":"Possible XSS vulnerability in SafeBuffer#% in Active Support","description":"### Impact\r\n`SafeBuffer#%` does not propagate the `@html_unsafe` flag to the newly created buffer. If a `SafeBuffer` is mutated in place (e.g. via `gsub!`) and then formatted with `%` using untrusted arguments, the result incorrectly reports `html_safe? == true`, bypassing ERB auto-escaping and possibly leading to XSS.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by @ch4n3-yoon","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-89vf-4333-qx8v","published_at":"2026-03-23T20:04:20Z","updated_at":"2026-04-09T18:39:26Z","withdrawn_at":null,"packages":[{"name":"activesupport","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activesupport","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activesupport","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-cg4j-q9v8-6v38","cve":"CVE-2026-33169","title":"Possible ReDoS vulnerability in number_to_delimited in Active Support","description":"### Impact\r\n`NumberToDelimitedConverter` used a regular expression with `gsub!` to insert thousands delimiters. This could produce quadratic time complexity on long digit strings.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [scyoon](https://hackerone.com/scyoon).\r\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-cg4j-q9v8-6v38","published_at":"2026-03-23T20:04:15Z","updated_at":"2026-04-21T19:11:36Z","withdrawn_at":null,"packages":[{"name":"activesupport","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activesupport","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activesupport","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-2j26-frm8-cmj9","cve":"CVE-2026-33176","title":"Possible DoS vulnerability in Active Support number helpers","description":"### Impact\r\nActive Support number helpers accept strings containing scientific notation (e.g. `1e10000`), which when converted to a string could be expanded into extremely large decimal representations. This can cause excessive memory allocation and CPU consumption when the expanded number is formatted, possibly resulting in a DoS vulnerability.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [manun](https://hackerone.com/manun).","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-2j26-frm8-cmj9","published_at":"2026-03-23T20:04:09Z","updated_at":"2026-04-21T19:25:01Z","withdrawn_at":null,"packages":[{"name":"activesupport","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activesupport","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activesupport","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-qcfx-2mfw-w4cg","cve":"CVE-2026-33173","title":"Insufficient filtering of metadata in Active Storage direct uploads","description":"### Impact\r\nActive Storage's `DirectUploadsController` accepts arbitrary metadata from the client and persists it on the blob. Because internal flags like `identified` and `analyzed` are stored in the same metadata hash, a malicious direct-upload client could set these flags.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis was responsible reported by Hackerone researcher [pwnie](https://hackerone.com/pwnie)","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-qcfx-2mfw-w4cg","published_at":"2026-03-23T19:57:47Z","updated_at":"2026-04-21T18:42:38Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activestorage","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-r46p-8f7g-vvvg","cve":"CVE-2026-33174","title":"Possible DoS vulnerability in Active Storage proxy mode via Range requests","description":"### Impact\r\nWhen serving files through Active Storage's `Blobs::ProxyController`, the controller loads the entire requested byte range into memory before sending it. A request with a large or unbounded Range header (e.g. `bytes=0-`) could cause the server to allocate memory proportional to the file size, possibly resulting in a DoS vulnerability through memory exhaustion.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone user [pirikara](https://hackerone.com/pirikara)","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-r46p-8f7g-vvvg","published_at":"2026-03-23T19:57:43Z","updated_at":"2026-04-21T17:55:46Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activestorage","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-p9fm-f462-ggrg","cve":"CVE-2026-33658","title":"Possible DoS vulnerability in Active Storage proxy mode via multi-range requests","description":"### Impact\r\nActive Storage's proxy controller does not limit the number of byte ranges in an HTTP Range header. A request with thousands of small ranges causes disproportionate CPU usage compared to a normal request for the same file, possibly resulting in a DoS vulnerability.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [thwin_htet](https://hackerone.com/thwin_htet).","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-p9fm-f462-ggrg","published_at":"2026-03-23T19:57:35Z","updated_at":"2026-04-21T19:18:19Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activestorage","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-9xrj-h377-fr87","cve":"CVE-2026-33195","title":"Possible path traversal in Active Storage DiskService","description":"### Impact\r\nActive Storage's `DiskService#path_for` does not validate that the resolved filesystem path remains within the storage root directory. If a blob key containing path traversal sequences (e.g. `../`) is used, it could allow reading, writing, or deleting arbitrary files on the server. Blob keys are expected to be trusted strings, but some applications could be passing user input as keys and would be affected.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credit\r\nThis issue was responsibly reported by Hackerone researcher [ksw9722](https://hackerone.com/ksw9722).","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-9xrj-h377-fr87","published_at":"2026-03-23T19:57:31Z","updated_at":"2026-04-21T19:15:26Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activestorage","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-73f9-jhhh-hr5m","cve":"CVE-2026-33202","title":"Possible glob injection in Active Storage DiskService","description":"### Impact\r\nActive Storage's `DiskService#delete_prefixed` passes blob keys directly to `Dir.glob` without escaping glob metacharacters. If a blob key contains attacker-controlled input or custom-generated keys with glob metacharacters, it may be possible to delete unintended files from the storage directory.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-73f9-jhhh-hr5m","published_at":"2026-03-23T19:57:24Z","updated_at":"2026-03-23T21:23:58Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.1, < 8.1.2.1","patched":"8.1.2.1"},{"name":"activestorage","affected":">= 8.0, < 8.0.4.1","patched":"8.0.4.1"},{"name":"activestorage","affected":"< 7.2.3.1","patched":"7.2.3.1"}]},{"id":"GHSA-r4mg-4433-c7g3","cve":"CVE-2025-24293","title":"Active Storage allowed transformation methods potentially unsafe","description":"Active Storage attempts to prevent the use of potentially unsafe image\r\ntransformation methods and parameters by default.\r\n\r\nThe default allowed list contains three methods allowing for the circumvention\r\nof the safe defaults which enables potential command injection\r\nvulnerabilities in cases where arbitrary user supplied input is accepted as\r\nvalid transformation methods or parameters.\r\n\r\nThis has been assigned the CVE identifier CVE-2025-24293.\r\n\r\n\r\nVersions Affected:  >= 5.2.0\r\nNot affected:       < 5.2.0\r\nFixed Versions:     7.1.5.2, 7.2.2.2, 8.0.2.1\r\n\r\nImpact\r\n------\r\nThis vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor.\r\n\r\nVulnerable code will look something similar to this:\r\n\r\n```\r\n<%= image_tag blob.variant(params[:t] => params[:v]) %>\r\n```\r\n\r\nWhere the transformation method or its arguments are untrusted arbitrary input.\r\n\r\nAll users running an affected release should either upgrade or use one of the workarounds immediately.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nConsuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous.\r\n\r\nStrict validation of user supplied methods and parameters should be performed as well as having a strong [ImageMagick security policy](https://imagemagick.org/script/security-policy.php) deployed.\r\n\r\nCredits\r\n-------\r\n\r\nThank you [lio346](https://hackerone.com/lio346) for reporting this!","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-r4mg-4433-c7g3","published_at":"2025-08-13T20:43:20Z","updated_at":"2025-08-13T20:43:20Z","withdrawn_at":null,"packages":[{"name":"activestorage","affected":">= 8.0, < 8.0.2.1","patched":"8.0.2.1"},{"name":"activestorage","affected":">= 7.2, < 7.2.2.2","patched":"7.2.2.2"},{"name":"activestorage","affected":">= 0, < 7.1.5.2","patched":"7.1.5.2"}]},{"id":"GHSA-76r7-hhxj-r776","cve":"CVE-2025-55193","title":"ANSI escape injection in Active Record logging","description":"This vulnerability has been assigned the CVE identifier CVE-2025-55193\r\n\r\n### Impact\r\nThe ID passed to `find` or similar methods may be logged without escaping. If this is directly to the terminal it may include unescaped ANSI sequences.\r\n\r\n### Releases\r\nThe fixed releases are available at the normal locations.\r\n\r\n### Credits\r\n\r\nThanks to [lio346](https://hackerone.com/lio346) for reporting this vulnerability","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-76r7-hhxj-r776","published_at":"2025-08-13T20:43:15Z","updated_at":"2025-08-13T20:43:15Z","withdrawn_at":null,"packages":[{"name":"activerecord","affected":">= 8.0, < 8.0.2.1","patched":"8.0.2.1"},{"name":"activerecord","affected":">= 7.2, < 7.2.2.2","patched":"7.2.2.2"},{"name":"activerecord","affected":">= 0, < 7.1.5.2","patched":"7.1.5.2"}]},{"id":"GHSA-vfm5-rmrh-j26v","cve":"CVE-2024-54133","title":"Possible Content Security Policy bypass in Action Dispatch","description":"There is a possible Cross Site Scripting (XSS) vulnerability  in the `content_security_policy` helper in Action Pack.\r\n\r\nImpact\r\n------\r\nApplications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nApplications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.\r\n\r\nCredits\r\n-------\r\nThanks to [ryotak](https://hackerone.com/ryotak) for the report!\r\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26v","published_at":"2024-12-10T21:52:47Z","updated_at":"2024-12-10T21:52:47Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 5.2.0, < 7.0.8.7","patched":"7.0.8.7"},{"name":"actionpack","affected":">= 7.1.0, <  7.1.5.1","patched":"7.1.5.1"},{"name":"actionpack","affected":">= 7.2.0, < 7.2.2.1","patched":"7.2.2.1"},{"name":"actionpack","affected":">= 8.0.0, < 8.0.0.1","patched":"8.0.0.1"}]},{"id":"GHSA-x76w-6vjr-8xgj","cve":"CVE-2024-41128","title":"Possible ReDoS vulnerability in query parameter filtering in Action Dispatch","description":"There is a possible ReDoS vulnerability in the query parameter filtering routines of Action Dispatch. This vulnerability has been assigned the CVE identifier CVE-2024-41128.\r\n\r\nImpact\r\n------\r\n\r\nCarefully crafted query parameters can cause query parameter filtering to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.\r\n\r\nRuby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.\r\n\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nUsers on Ruby 3.2 are unaffected by this issue.\r\n\r\n\r\nCredits\r\n-------\r\n\r\nThanks to [scyoon](https://hackerone.com/scyoon) for the report and patches!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-x76w-6vjr-8xgj","published_at":"2024-10-15T21:16:08Z","updated_at":"2024-10-15T21:16:08Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 3.1.0, < 6.1.7.9","patched":"6.1.7.9"},{"name":"actionpack","affected":">= 7.0.0, < 7.0.8.5","patched":"7.0.8.5"},{"name":"actionpack","affected":">= 7.1.0, < 7.1.4.1","patched":"7.1.4.1"},{"name":"actionpack","affected":">= 7.2.0, < 7.2.1.1","patched":"7.2.1.1"}]},{"id":"GHSA-vfg9-r3fq-jvx4","cve":"CVE-2024-47887","title":"Possible ReDoS vulnerability in HTTP Token authentication in Action Controller","description":"There is a possible ReDoS vulnerability in Action Controller's HTTP Token authentication. This vulnerability has been assigned the CVE identifier CVE-2024-47887.\r\n\r\nImpact\r\n------\r\n\r\nFor applications using HTTP Token authentication via `authenticate_or_request_with_http_token` or similar, a carefully crafted header may cause header parsing to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.\r\n\r\nRuby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nUsers on Ruby 3.2 are unaffected by this issue.\r\n\r\n\r\nCredits\r\n-------\r\nThanks to [scyoon](https://hackerone.com/scyoon) for reporting","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-vfg9-r3fq-jvx4","published_at":"2024-10-15T21:16:04Z","updated_at":"2024-10-15T21:16:04Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 4.0.0, < 6.1.7.9","patched":"6.1.7.9"},{"name":"actionpack","affected":">= 7.0.0, < 7.0.8.5","patched":"7.0.8.5"},{"name":"actionpack","affected":">= 7.1.0, < 7.1.4.1","patched":"7.1.4.1"},{"name":"actionpack","affected":">= 7.2.0, < 7.2.1.1","patched":"7.2.1.1"}]},{"id":"GHSA-wwhv-wxv9-rpgw","cve":"CVE-2024-47888","title":"Possible ReDoS vulnerability in plain_text_for_blockquote_node in Action Text","description":"There is a possible ReDoS vulnerability in the plain_text_for_blockquote_node helper in Action Text. This vulnerability has been assigned the CVE identifier CVE-2024-47888.\r\n\r\nImpact\r\n------\r\n\r\nCarefully crafted text can cause the plain_text_for_blockquote_node helper to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.\r\n\r\nRuby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.\r\n\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nUsers can avoid calling `plain_text_for_blockquote_node` or upgrade to Ruby 3.2\r\n\r\nCredits\r\n-------\r\n\r\nThanks to [ooooooo_q](https://hackerone.com/ooooooo_q) for the report!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-wwhv-wxv9-rpgw","published_at":"2024-10-15T21:15:59Z","updated_at":"2024-10-15T21:15:59Z","withdrawn_at":null,"packages":[{"name":"actiontext","affected":">= 6.0.0, < 6.1.7.9","patched":"6.1.7.9"},{"name":"actiontext","affected":">= 7.0.0, < 7.0.8.5","patched":"7.0.8.5"},{"name":"actiontext","affected":">= 7.1.0, < 7.1.4.1","patched":"7.1.4.1"},{"name":"actiontext","affected":">= 7.2.0, < 7.2.1.1","patched":"7.2.1.1"}]},{"id":"GHSA-h47h-mwp9-c6q6","cve":"CVE-2024-47889","title":"Possible ReDoS vulnerability in block_format in Action Mailer","description":"There is a possible ReDoS vulnerability in the block_format helper in Action Mailer. This vulnerability has been assigned the CVE identifier CVE-2024-47889.\r\n\r\nImpact\r\n------\r\n\r\nCarefully crafted text can cause the block_format helper to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.\r\n\r\nRuby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 requires Ruby 3.2 or greater so is unaffected.\r\n\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nUsers can avoid calling the `block_format` helper or upgrade to Ruby 3.2\r\n\r\nCredits\r\n-------\r\n\r\nThanks to yuki_osaki for the report!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-h47h-mwp9-c6q6","published_at":"2024-10-15T21:15:41Z","updated_at":"2025-01-07T21:23:59Z","withdrawn_at":null,"packages":[{"name":"actionmailer","affected":">= 3.0.0, < 6.1.7.9","patched":"6.1.7.9"},{"name":"actionmailer","affected":">= 7.0.0, < 7.0.8.5","patched":"7.0.8.5"},{"name":"actionmailer","affected":">= 7.1.0, < 7.1.4.1","patched":"7.1.4.1"},{"name":"actionmailer","affected":">= 7.2.0, < 7.2.1.1","patched":"7.2.1.1"}]},{"id":"GHSA-fwhr-88qx-h9g7","cve":"CVE-2024-28103","title":"Missing security headers in Action Pack on non-HTML responses","description":"# Permissions-Policy is Only Served on HTML Content-Type\r\n\r\nThe application configurable Permissions-Policy is only served on responses\r\nwith an HTML related Content-Type.\r\n\r\nThis has been assigned the CVE identifier CVE-2024-28103.\r\n\r\n\r\nVersions Affected:  >= 6.1.0\r\nNot affected:       < 6.1.0\r\nFixed Versions:     6.1.7.8, 7.0.8.4, and 7.1.3.4\r\n\r\nImpact\r\n------\r\nResponses with a non-HTML Content-Type are not serving the configured Permissions-Policy. There are certain non-HTML Content-Types that would benefit from having the Permissions-Policy enforced.\r\n\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nN/A\r\n\r\nPatches\r\n-------\r\nTo aid users who aren't able to upgrade immediately we have provided patches for\r\nthe supported release series in accordance with our \r\n[maintenance policy](https://guides.rubyonrails.org/maintenance_policy.html#security-issues)\r\nregarding security issues. They are in git-am format and consist of a\r\nsingle changeset.\r\n\r\n* 6-1-include-permissions-policy-header-on-non-html.patch - Patch for 6.1 series\r\n* 7-0-include-permissions-policy-header-on-non-html.patch - Patch for 7.0 series\r\n* 7-1-include-permissions-policy-header-on-non-html.patch - Patch for 7.1 series\r\n\r\n\r\n\r\nCredits\r\n-------\r\n\r\nThank you [shinkbr](https://hackerone.com/shinkbr) for reporting this!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-fwhr-88qx-h9g7","published_at":"2024-06-04T18:30:09Z","updated_at":"2024-06-04T18:30:09Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 6.1.0","patched":"6.1.7.8, 7.0.8.4, 7.1.3.4, 7.2.0.beta2"}]},{"id":"GHSA-prjp-h48f-jgf6","cve":"CVE-2024-32464","title":"ActionText ContentAttachment can contain unsanitized HTML","description":"Instances of ActionText::Attachable::ContentAttachment included within a rich_text_area tag could potentially contain unsanitized HTML.\r\n\r\nThis has been assigned the CVE identifier CVE-2024-32464.\r\n\r\n\r\nVersions Affected:  >= 7.1.0\r\nNot affected:       < 7.1.0\r\nFixed Versions:     7.1.3.4\r\n\r\nImpact\r\n------\r\nThis could lead to a potential cross site scripting issue within the Trix editor.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nN/A\r\n\r\nPatches\r\n-------\r\nTo aid users who aren't able to upgrade immediately we have provided patches for the supported release series in accordance with our [maintenance policy](https://guides.rubyonrails.org/maintenance_policy.html#security-issues) regarding security issues. They are in git-am format and consist of a single changeset.\r\n\r\n* action_text_content_attachment_xss_7_1_stable.patch - Patch for 7.1 series\r\n\r\n\r\n\r\nCredits\r\n-------\r\n\r\nThank you [ooooooo_q](https://hackerone.com/ooooooo_q) for reporting this!","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-prjp-h48f-jgf6","published_at":"2024-06-04T18:29:52Z","updated_at":"2024-06-04T18:29:52Z","withdrawn_at":null,"packages":[{"name":"actiontext","affected":">= 7.1.0","patched":"7.1.3.4, 7.2.0.beta2"}]},{"id":"GHSA-jjhx-jhvp-74wq","cve":"CVE-2024-26142","title":"Possible ReDoS vulnerability in Accept header parsing in Action Dispatch","description":"# Possible ReDoS vulnerability in Accept header parsing in Action Dispatch\r\n\r\nThere is a possible ReDoS vulnerability in the Accept header parsing routines\r\nof Action Dispatch. This vulnerability has been assigned the CVE identifier\r\nCVE-2024-26142.\r\n\r\nVersions Affected:  >= 7.1.0, < 7.1.3.1\r\nNot affected:       < 7.1.0\r\nFixed Versions:     7.1.3.1\r\n\r\nImpact\r\n------\r\nCarefully crafted Accept headers can cause Accept header parsing in Action\r\nDispatch to take an unexpected amount of time, possibly resulting in a DoS\r\nvulnerability.  All users running an affected release should either upgrade or\r\nuse one of the workarounds immediately.\r\n\r\nRuby 3.2 has mitigations for this problem, so Rails applications using Ruby\r\n3.2 or newer are unaffected.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nThere are no feasible workarounds for this issue.\r\n\r\nPatches\r\n-------\r\nTo aid users who aren't able to upgrade immediately we have provided patches for\r\nthe two supported release series. They are in git-am format and consist of a\r\nsingle changeset.\r\n\r\n* 7-1-accept-redox.patch - Patch for 7.1 series\r\n\r\nCredits\r\n-------\r\nThanks [svalkanov](https://hackerone.com/svalkanov) for the report and patch!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-jjhx-jhvp-74wq","published_at":"2024-02-26T23:59:14Z","updated_at":"2024-02-26T23:59:14Z","withdrawn_at":null,"packages":[{"name":"rails","affected":">= 7.1.0, < 7.1.3.1","patched":"7.1.3.1"}]},{"id":"GHSA-8h22-8cf7-hq6g","cve":"CVE-2024-26144","title":"Possible Sensitive Session Information Leak in Active Storage","description":"# Possible Sensitive Session Information Leak in Active Storage\r\n\r\nThere is a possible sensitive session information leak in Active Storage.  By\r\ndefault, Active Storage sends a `Set-Cookie` header along with the user's\r\nsession cookie when serving blobs.  It also sets `Cache-Control` to public.\r\nCertain proxies may cache the Set-Cookie, leading to an information leak.\r\n\r\nThis vulnerability has been assigned the CVE identifier CVE-2024-26144.\r\n\r\nVersions Affected:  >= 5.2.0, < 7.1.0\r\nNot affected:       < 5.2.0, > 7.1.0\r\nFixed Versions:     7.0.8.1, 6.1.7.7\r\n\r\nImpact\r\n------\r\nA proxy which chooses to caches this request can cause users to share\r\nsessions. This may include a user receiving an attacker's session or vice\r\nversa.\r\n\r\nThis was patched in 7.1.0 but not previously identified as a security\r\nvulnerability.\r\n\r\nAll users running an affected release should either upgrade or use one of the\r\nworkarounds immediately.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nUpgrade to Rails 7.1.X, or configure caching proxies not to cache the\r\nSet-Cookie headers.\r\n\r\nCredits\r\n-------\r\n\r\nThanks to [tyage](https://hackerone.com/tyage) for reporting this!\r\n","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-8h22-8cf7-hq6g","published_at":"2024-02-26T23:58:46Z","updated_at":"2024-02-26T23:58:46Z","withdrawn_at":null,"packages":[{"name":"rails","affected":">= 5.2.0, < 7.1.0","patched":"7.0.8.1, 6.1.7.7"}]},{"id":"GHSA-9822-6m93-xqf4","cve":"CVE-2024-26143","title":"Possible XSS Vulnerability in Action Controller translation","description":"# Possible XSS Vulnerability in Action Controller\r\n\r\nThere is a possible XSS vulnerability when using the translation helpers\r\n(`translate`, `t`, etc) in Action Controller. This vulnerability has been\r\nassigned the CVE identifier CVE-2024-26143.\r\n\r\nVersions Affected:  >= 7.0.0.\r\nNot affected:       < 7.0.0\r\nFixed Versions:     7.1.3.1, 7.0.8.1\r\n\r\nImpact\r\n------\r\nApplications using translation methods like `translate`, or `t` on a\r\ncontroller, with a key ending in \"_html\", a `:default` key which contains\r\nuntrusted user input, and the resulting string is used in a view, may be\r\nsusceptible to an XSS vulnerability.\r\n\r\nFor example, impacted code will look something like this:\r\n\r\n```ruby\r\nclass ArticlesController < ApplicationController\r\n  def show  \r\n    @message = t(\"message_html\", default: untrusted_input)\r\n    # The `show` template displays the contents of `@message`\r\n  end\r\nend\r\n```\r\n\r\nTo reiterate the pre-conditions, applications must:\r\n\r\n* Use a translation function from a controller (i.e. _not_ I18n.t, or `t` from\r\n  a view)\r\n* Use a key that ends in `_html`\r\n* Use a default value where the default value is untrusted and unescaped input\r\n* Send the text to the victim (whether that's part of a template, or a\r\n  `render` call)\r\n\r\nAll users running an affected release should either upgrade or use one of the\r\nworkarounds immediately.\r\n\r\nReleases\r\n--------\r\nThe fixed releases are available at the normal locations.\r\n\r\nWorkarounds\r\n-----------\r\nThere are no feasible workarounds for this issue.\r\n\r\nPatches\r\n-------\r\nTo aid users who aren't able to upgrade immediately we have provided patches for\r\nthe two supported release series. They are in git-am format and consist of a\r\nsingle changeset.\r\n\r\n* 7-0-VULN.patch - Patch for 7.0 series\r\n* 7-1-VULN.patch - Patch for 7.1 series\r\n\r\nCredits\r\n-------\r\n\r\nThanks to [ooooooo_q](https://hackerone.com/ooooooo_q) for the patch and fix!","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-9822-6m93-xqf4","published_at":"2024-02-26T23:58:04Z","updated_at":"2024-02-26T23:58:04Z","withdrawn_at":null,"packages":[{"name":"rails","affected":">= 7.0.0","patched":"7.1.3.1, 7.0.8.1"}]},{"id":"GHSA-wh98-p28r-vrc9","cve":"CVE-2022-23633","title":"Possible exposure of information vulnerability in Action Pack","description":"### Impact\r\n\r\nUnder certain circumstances response bodies will not be closed, for example a [bug in a webserver](https://github.com/puma/puma/pull/2812) or a bug in a Rack middleware.  In the event a response is *not* notified of a `close`, `ActionDispatch::Executor` will not know to reset thread local state for the next request.  This can lead to data being leaked to subsequent requests, especially when interacting with `ActiveSupport::CurrentAttributes`.\r\n\r\nUpgrading to the FIXED versions of Rails will ensure mitigation if this issue even in the context of a buggy webserver or middleware implementation.\r\n\r\n### Patches\r\n\r\nThis has been fixed in Rails 7.0.2.2, 6.1.4.6, 6.0.4.6, and 5.2.6.2.\r\n\r\n### Workarounds\r\n\r\nUpgrading is highly recommended, but to work around this problem the following middleware can be used:\r\n\r\n```ruby\r\nclass GuardedExecutor < ActionDispatch::Executor\r\n  def call(env)\r\n    ensure_completed!\r\n    super\r\n  end\r\n\r\n  private\r\n\r\n    def ensure_completed!\r\n      @executor.new.complete! if @executor.active?\r\n    end\r\nend\r\n\r\n# Ensure the guard is inserted before ActionDispatch::Executor\r\nRails.application.configure do\r\n  config.middleware.swap ActionDispatch::Executor, GuardedExecutor, executor\r\nend\r\n```","severity":"high","url":"https://github.com/rails/rails/security/advisories/GHSA-wh98-p28r-vrc9","published_at":"2022-02-11T20:13:42Z","updated_at":"2022-02-11T20:13:42Z","withdrawn_at":null,"packages":[{"name":"actionpack","affected":">= 5.0.0","patched":"7.0.2.2, 6.1.4.6, 6.0.4.6, 5.2.6.2"}]},{"id":"GHSA-cfjv-5498-mph5","cve":"CVE-2020-15169","title":"Potential XSS vulnerability in Action View","description":"There is a potential Cross-Site Scripting (XSS) vulnerability in Action View's translation helpers. Views that allow the user to control the default (not found) value of the `t` and `translate` helpers could be susceptible to XSS attacks.\r\n\r\n### Impact\r\n\r\nWhen an HTML-unsafe string is passed as the default for a missing translation key [named `html` or ending in `_html`](https://guides.rubyonrails.org/i18n.html#using-safe-html-translations), the default string is incorrectly marked as HTML-safe and not escaped. Vulnerable code may look like the following examples:\r\n\r\n```erb\r\n<%# The welcome_html translation is not defined for the current locale: %>\r\n<%= t(\"welcome_html\", default: untrusted_user_controlled_string) %>\r\n\r\n<%# Neither the title.html translation nor the missing.html translation is defined for the current locale: %>\r\n<%= t(\"title.html\", default: [:\"missing.html\", untrusted_user_controlled_string]) %>\r\n```\r\n\r\n### Patches\r\n\r\nPatched Rails versions, 6.0.3.3 and 5.2.4.4, are available from the normal locations.\r\n\r\nThe patches have also been applied to the `master`, `6-0-stable`, and `5-2-stable` branches on GitHub. If you track any of these branches, you should update to the latest.\r\n\r\nTo aid users who aren’t able to upgrade immediately, we’ve provided patches for the two supported release series. They are in git-am format and consist of a single changeset.\r\n\r\n* [5-2-translate-helper-xss.patch](https://gist.github.com/georgeclaghorn/a466e103922ee81f24c32c9034089442#file-5-2-translate-helper-xss-patch) — patch for the 5.2 release series\r\n* [6-0-translate-helper-xss.patch](https://gist.github.com/georgeclaghorn/a466e103922ee81f24c32c9034089442#file-6-0-translate-helper-xss-patch) — patch for the 6.0 release series\r\n\r\nPlease note that only the 5.2 and 6.0 release series are currently supported. Users of earlier, unsupported releases are advised to update as soon as possible, as we cannot provide security fixes for unsupported releases.\r\n\r\n### Workarounds\r\n\r\nImpacted users who can’t upgrade to a patched Rails version can avoid this issue by manually escaping default translations with the `html_escape` helper (aliased as `h`):\r\n\r\n```erb\r\n<%= t(\"welcome_html\", default: h(untrusted_user_controlled_string)) %>\r\n```","severity":"unknown","url":"https://github.com/rails/rails/security/advisories/GHSA-cfjv-5498-mph5","published_at":"2020-09-11T00:05:17Z","updated_at":"2020-09-11T00:05:17Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":"All","patched":"6.0.3.3, 5.2.4.4"}]},{"id":"GHSA-65cv-r6x7-79hv","cve":"CVE-2020-5267","title":"Possible XSS vulnerability in ActionView","description":"There is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers.  Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks.\r\n\r\n### Impact\r\n\r\nThere is a possible XSS vulnerability in the `j` and `escape_javascript` methods in ActionView.  These methods are used for escaping JavaScript string literals.  Impacted code will look something like this:\r\n\r\n```erb\r\n<script>let a = `<%= j unknown_input %>`</script>\r\n```\r\n\r\nor\r\n\r\n```erb\r\n<script>let a = `<%= escape_javascript unknown_input %>`</script>\r\n```\r\n\r\n### Releases\r\n\r\nThe 6.0.2.2 and 5.2.4.2 releases are available at the normal locations.\r\n\r\n### Workarounds\r\n\r\nFor those that can't upgrade, the following monkey patch may be used:\r\n\r\n```ruby\r\nActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP.merge!(\r\n  {\r\n    \"`\" => \"\\\\`\",\r\n    \"$\" => \"\\\\$\"\r\n  }\r\n)\r\n\r\nmodule ActionView::Helpers::JavaScriptHelper\r\n  alias :old_ej :escape_javascript\r\n  alias :old_j :j\r\n\r\n  def escape_javascript(javascript)\r\n    javascript = javascript.to_s\r\n    if javascript.empty?\r\n      result = \"\"\r\n    else\r\n      result = javascript.gsub(/(\\\\|<\\/|\\r\\n|\\342\\200\\250|\\342\\200\\251|[\\n\\r\"']|[`]|[$])/u, JS_ESCAPE_MAP)\r\n    end\r\n    javascript.html_safe? ? result.html_safe : result\r\n  end\r\n\r\n  alias :j :escape_javascript\r\nend\r\n```\r\n\r\n### Patches\r\n\r\nTo aid users who aren't able to upgrade immediately we have provided patches for\r\nthe two supported release series. They are in git-am format and consist of a\r\nsingle changeset.\r\n\r\n* [5-2-js-helper-xss.patch](https://gist.github.com/tenderlove/c042ff49f0347c37e99183a6502accc6#file-5-2-js-helper-xss-patch) - Patch for 5.2 series\r\n* [6-0-js-helper-xss.patch](https://gist.github.com/tenderlove/c042ff49f0347c37e99183a6502accc6#file-6-0-js-helper-xss-patch) - Patch for 6.0 series\r\n\r\nPlease note that only the 5.2 and 6.0 series are supported at present. Users\r\nof earlier unsupported releases are advised to upgrade as soon as possible as we\r\ncannot guarantee the continued availability of security fixes for unsupported\r\nreleases.\r\n\r\n### Credits\r\n\r\nThanks to Jesse Campos from Chef Secure\r\n","severity":"low","url":"https://github.com/rails/rails/security/advisories/GHSA-65cv-r6x7-79hv","published_at":"2020-03-19T16:55:15Z","updated_at":"2020-03-19T16:55:15Z","withdrawn_at":null,"packages":[{"name":"actionview","affected":"ALL","patched":"6.0.2.2, 5.2.4.2"}]}]}