CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
CarrierWave is a solution for file uploads for Rails, Sinatra and other Ruby web frameworks. CarrierWave has a Content-Type allowlist bypass vulnerability, possibly leading to XSS. The validation in `allowlisted_content_type?` determines Content-Type permissions by performing a partial match. If the `content_type` argument of `allowlisted_content_type?` is passed a value crafted by the attacker, Content-Types not included in the `content_type_allowlist` will be allowed. This issue has been patched in versions 2.2.5 and 3.0.5.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-49090
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 03:35 UTC · Revision 1
Source evidence
CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS
core-osv · Original sourcePublished 29 Nov 2023, 14:38 UTC
CarrierWave is a solution for file uploads for Rails, Sinatra and other Ruby web frameworks. CarrierWave has a Content-Type allowlist bypass vulnerability, possibly leading to XSS. The validation in `allowlisted_content_type?` determines Content-Type permissions by performing a partial match. If the `content_type` argument of `allowlisted_content_type?` is passed a value crafted by the attacker, Content-Types not included in the `content_type_allowlist` will be allowed. This issue has been patched in versions 2.2.5 and 3.0.5.
osv:CVE-2023-49090
Complete source record
{
"id": "d2dbecad0213eb41c63333ba4bb25e04ffb997238c07cbb2fa038cebaaaef257",
"url": "https://osv.dev/vulnerability/CVE-2023-49090",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CarrierWave has a content-type allowlist bypass vulnerability, possibly leading to XSS",
"summary": "CarrierWave is a solution for file uploads for Rails, Sinatra and other Ruby web frameworks. CarrierWave has a Content-Type allowlist bypass vulnerability, possibly leading to XSS. The validation in `allowlisted_content_type?` determines Content-Type permissions by performing a partial match. If the `content_type` argument of `allowlisted_content_type?` is passed a value crafted by the attacker, Content-Types not included in the `content_type_allowlist` will be allowed. This issue has been patched in versions 2.2.5 and 3.0.5.",
"evidence": "osv:CVE-2023-49090",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2023-49090",
"aliases": [
"CVE-2023-49090",
"GHSA-gxhx-g4fq-49hj"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/carrierwaveuploader/carrierwave",
"type": "GIT",
"events": [
{
"introduced": "13330a70323cde83b319520f5c1874227de79cdf"
},
{
"fixed": "0fcff94cebce07b856531d6502b11466e8331409"
},
{
"introduced": "269c37a6c8609c26915f31ccfada512ef12fb3cb"
},
{
"fixed": "5316b352b6ed38595e99622eeb954a2cd0b1d5c2"
},
{
"fixed": "39b282db5c1303899b3d3381ce8a837840f983b5"
},
{
"fixed": "863d425c76eba12c3294227b39018f6b2dccbbf3"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.0.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "39b282db5c1303899b3d3381ce8a837840f983b5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "863d425c76eba12c3294227b39018f6b2dccbbf3"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v2.2.4",
"v3.0.4",
"v3.0.3",
"v3.0.2",
"v3.0.1",
"v3.0.0",
"v2.2.3",
"v2.2.2",
"v2.2.1",
"v2.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-49090.json"
}
}
],
"modified": "2026-10-28T02:30:42.455420561Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/49xxx/CVE-2023-49090.json",
"https://github.com/carrierwaveuploader/carrierwave/security/advisories/GHSA-gxhx-g4fq-49hj",
"https://nvd.nist.gov/vuln/detail/CVE-2023-49090",
"https://github.com/carrierwaveuploader/carrierwave/commit/39b282db5c1303899b3d3381ce8a837840f983b5",
"https://github.com/carrierwaveuploader/carrierwave/commit/863d425c76eba12c3294227b39018f6b2dccbbf3"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/49xxx/CVE-2023-49090.json"
}
},
"related_cves": [
{
"value": "CVE-2023-49090",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 509887,
"published_at": "2023-11-29T14:38:52.195+00:00"
}