CVE-2021-21305

CVE-2021-21305 is a high-severity vulnerability in Carrierwave Project Carrierwave with a CVSS 3.x base score of 7.4. Its EPSS exploit-prediction score of 13% places it in the 96th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-94.

Key facts

Description

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.

Frequently asked questions

What is CVE-2021-21305?
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.
How severe is CVE-2021-21305?
CVE-2021-21305 has a CVSS 3.x base score of 7.4, rated high severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is low, integrity low, and availability low.
Is CVE-2021-21305 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 13% (96th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2021-21305?
CVE-2021-21305 affects Carrierwave Project Carrierwave. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2021-21305?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
When was CVE-2021-21305 published?
CVE-2021-21305 was published on 2021-02-08 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Carrierwave Project Carrierwave

All CVEs affecting Carrierwave Project Carrierwave →

Other CWE-94 (Code Injection) vulnerabilities

Browse all CWE-94 (Code Injection) vulnerabilities →