chore(deps): update dependency carrierwave to v3.1.3 [security]#626
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency carrierwave to v3.1.3 [security]#626renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## staging #626 +/- ##
========================================
Coverage 99.92% 99.92%
========================================
Files 197 197
Lines 2665 2665
========================================
Hits 2663 2663
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.2→3.1.3CarrierWave has a denylisted_content_type bypass via Unescaped Regex Metacharacters
CVE-2026-44587 / GHSA-7g26-2qgj-chfg
More information
Details
Summary
CarrierWave's content_type_denylist check fails to escape regex metacharacters in string entries, causing the denylist to silently not match the content types it is intended to block.
Note: CarrierWave is aware
#content_type_denylist is deprecated for the security reason, but it still used by developers, and the problem here isn't denylist allows any filetype, and thats not a vulnerability in carrierwave, its an implementation problem in developers using CarrierWave, the problem is its denylist entries are interpolated directly into a regex withoutRegexp.quoteor anchoring. The denylist is still useful when developers want to ban specific content types but allow everything else.Details
In
lib/carrierwave/uploader/content_type_denylist.rb:57, string denylist entries are interpolated directly into a regex withoutRegexp.quoteor anchoring:Other affected MIME types include
application/xhtml+xmland any type containing regex metacharacters.Fix: Apply Regexp.quote for string entries and anchor with \A, matching the existing allowlist implementation:
PoC
Expected response (denylist working):
Actual response:
Impact
Any application that uses content_type_denylist to block image/svg+xml — the most common use case, specifically to prevent stored XSS — is silently unprotected. An attacker can upload an SVG file containing arbitrary
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
carrierwaveuploader/carrierwave (carrierwave)
v3.1.3Compare Source
Security
Configuration
📅 Schedule: (in timezone Europe/Amsterdam)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.