Vulnerabilities in pkg:gem/rmagick

PACKAGE
Advisory Identifier: GHSA-frgf-8jr5-j2jv
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/rmagick

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/rmagick. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-frgf-8jr5-j2jv CVE-2023-5349 MODERATE memory leak flaw was found in ruby-magick

CVE-2023-5349 at a Glance

CVE Identifier CVE-2023-5349
GHSA Identifier GHSA-frgf-8jr5-j2jv
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Rmagick
Package Ecosystem RubyGems
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

rmagick fixed: 5.3.0
Upgrade rmagick to 5.3.0
Verify Direct and Transitive Dependencies

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

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.

CVE-2023-5349 Affected Rmagick Versions

1 component(s)
Fixed Versions:
5.3.0
Product / Package Ecosystem Affected Versions Fixed Version
rmagick
RubyGems
< 5.3.0
5.3.0

References

Frequently Asked Questions

What is CVE-2023-5349?
CVE-2023-5349 is a security vulnerability in Rmagick involving memory leak flaw was found in ruby-magick under CWE-400: Uncontrolled Resource Consumption.
Which Rmagick versions are affected?
Affected versions include releases prior to 5.3.0 across affected packages: rmagick.
What version fixes CVE-2023-5349?
Upgrading to 5.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rmagick affected?
Yes, rmagick is affected in releases prior to 5.3.0. Upgrade your dependency to 5.3.0 or later.
What is the CVSS score of CVE-2023-5349?
CVE-2023-5349 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2023-5349?
CVE-2023-5349 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2023-5349?
Run the dependency tree command: 'inspect dependencies for rmagick'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}