CVE-2023-5349: Rmagick Memory Leak Flaw Was Found Vulnerability
MODERATECVE-2023-5349 is a MODERATE (CVSS 5.3) memory leak flaw was found vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Rmagick libraries in the RubyGems ecosystem. The issue involves memory leak flaw was found in ruby-magick. Remediation is available by upgrading affected packages to version 5.3.0.
CVE-2023-5349 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2023-5349
To remediate this vulnerability, upgrade all affected Rmagick dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rmagick to 5.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rmagick
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-5349, inspect your project dependencies for Rmagick:
inspect dependencies for rmagick
Analyze the terminal output to locate any version of Rmagick in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Rmagick, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-5349 Affected Rmagick Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rmagick
|
RubyGems |
< 5.3.0
|
5.3.0
|
References
Frequently Asked Questions
What is CVE-2023-5349?
Which Rmagick versions are affected?
What version fixes CVE-2023-5349?
Is rmagick affected?
What is the CVSS score of CVE-2023-5349?
What CWE is associated with CVE-2023-5349?
How can I check RubyGems dependencies for CVE-2023-5349?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-frgf-8jr5-j2jv",
"modified" : "2026-06-08T23:16:29Z",
"published" : "2023-10-30T21:33:39Z",
"aliases" : [ "CVE-2023-5349" ],
"summary" : "memory leak flaw was found in ruby-magick",
"details" : "A memory leak flaw was found in ruby-magick, an interface between Ruby and ImageMagick. This issue can lead to a denial of service (DOS) by memory exhaustion.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rmagick"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-5349"
}, {
"type" : "WEB",
"url" : "https://github.com/rmagick/rmagick/issues/1401"
}, {
"type" : "WEB",
"url" : "https://github.com/rmagick/rmagick/pull/1406"
}, {
"type" : "WEB",
"url" : "https://github.com/rmagick/rmagick/commit/02f37ca0d6c2b8fff316e0668efa690f5c90a429"
}, {
"type" : "WEB",
"url" : "https://github.com/rmagick/rmagick/commit/fec7a7e639ae565386f7615155dbcf49b957b64a"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2023-5349"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2247064"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-frgf-8jr5-j2jv"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rmagick/rmagick"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rmagick/CVE-2023-5349.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/10/msg00030.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2026/01/msg00003.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S3XMQ2KWPYGT447EKPENGXXHKAQ5NUWF"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-401" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-31T19:41:15Z",
"nvd_published_at" : "2023-10-30T21:15:07Z"
}
}