ruby-carrierwave — security advisory
CarrierWave is an open-source RubyGem which provides a simple and flexible way to upload files from Ruby applications. In CarrierWave before versions 1.3.2 and 2.1.1, there is a code injection vulnerability. The "#manipulate!" method inappropriately evals the content of mutation option(:read/:write), allowing attackers to craft a string that can be executed as a Ruby code. If an application developer supplies untrusted inputs to the option, it will lead to remote code execution(RCE). This is fixed in versions 1.3.2 and 2.1.1.
- Products
- ruby-carrierwave
- Affected versions
- Not specified
- Fixed versions
- 1.3.2-1
- CVEs
- CVE-2021-21305
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 00:20 UTC · Revision 1
Source evidence
CarrierWave is an open-source RubyGem which provides a simple and flexible way to upload files from Ruby applications. In CarrierWave before versions 1.3.2 and 2.1.1, there is a code injection vulnerability. The "#manipulate!" method inappropriately evals the content of mutation option(:read/:write), allowing attackers to craft a string that can be executed as a Ruby code. If an application developer supplies untrusted inputs to the option, it will lead to remote code execution(RCE). This is fixed in versions 1.3.2 and 2.1.1.
osv:DEBIAN-CVE-2021-21305
ruby-carrierwave
Fixed versions: 1.3.2-1
Complete source record
{
"id": "be81535c1fff0b16785bdba3b39771ffee2c97345b613003e66ea2090d0abcf1",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-21305",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2021-21305",
"summary": "CarrierWave is an open-source RubyGem which provides a simple and flexible way to upload files from Ruby applications. In CarrierWave before versions 1.3.2 and 2.1.1, there is a code injection vulnerability. The \"#manipulate!\" method inappropriately evals the content of mutation option(:read/:write), allowing attackers to craft a string that can be executed as a Ruby code. If an application developer supplies untrusted inputs to the option, it will lead to remote code execution(RCE). This is fixed in versions 1.3.2 and 2.1.1.",
"evidence": "osv:DEBIAN-CVE-2021-21305",
"products": [
{
"name": {
"value": "ruby-carrierwave",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.3.2-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2021-21305",
"aliases": [
"DEBIAN-CVE-2021-21305"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.2-1"
}
]
}
],
"package": {
"name": "ruby-carrierwave",
"purl": "pkg:deb/debian/ruby-carrierwave?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-21305.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-23T18:03:11.694038312Z",
"provider": "osv",
"upstream": [
"CVE-2021-21305"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2021-21305"
]
},
"related_cves": [
{
"value": "CVE-2021-21305",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 420763,
"published_at": "2021-02-08T20:15:12.527+00:00"
}